From 54e86c20dc866bac973f5ebf61d05fd108f22571 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Tue, 24 Oct 2023 21:32:05 +0200 Subject: [PATCH] Fix building TelegramException in getCommandsList() This fix the following TypeError: Exception::__construct(): Argument #2 ($code) must be of type int, Exception given --- src/Telegram.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Telegram.php b/src/Telegram.php index 075b6fc6..fd6a45d4 100644 --- a/src/Telegram.php +++ b/src/Telegram.php @@ -303,7 +303,7 @@ public function getCommandsList(): array } } } catch (Exception $e) { - throw new TelegramException('Error getting commands from path: ' . $path, $e); + throw new TelegramException('Error getting commands from path: ' . $path, $e->getCode(), $e); } }