Skip to content

Commit 54e86c2

Browse files
authored
Fix building TelegramException in getCommandsList()
This fix the following TypeError: Exception::__construct(): Argument php-telegram-bot#2 ($code) must be of type int, Exception given
1 parent da45ae5 commit 54e86c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Telegram.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ public function getCommandsList(): array
303303
}
304304
}
305305
} catch (Exception $e) {
306-
throw new TelegramException('Error getting commands from path: ' . $path, $e);
306+
throw new TelegramException('Error getting commands from path: ' . $path, $e->getCode(), $e);
307307
}
308308
}
309309

0 commit comments

Comments
 (0)