Closed
Description
🐞 Bug Report
Hello, i have a bug with the poll update.
Required Information
? | ! |
---|---|
Operating system | Debian 9 |
PHP Telegram Bot version | 0.60.0 |
PHP version | 7.3.1 |
MySQL version | 8.0.15 |
Update Method | Webhook |
Self-signed certificate | no |
My logs | local.ERROR: PDOStatement::execute(): SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'is_closed' at row 1 {"exception":"[object] (ErrorException(code: 0): PDOStatement::execute(): SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'is_closed' at row 1 at /var/www/vendor/longman/telegram-bot/src/DB.php:851) [stacktrace] #0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'PDOStatement::e...', '/var/www/vendor...', 851, Array) #1 /var/www/vendor/longman/telegram-bot/src/DB.php(851): PDOStatement->execute() #2 /var/www/vendor/longman/telegram-bot/src/DB.php(552): Longman\\TelegramBot\\DB::insertPollRequest(Object(Longman\\TelegramBot\\Entities\\Poll)) #3 /var/www/vendor/longman/telegram-bot/src/Telegram.php(487): Longman\\TelegramBot\\DB::insertRequest(Object(Longman\\TelegramBot\\Entities\\Update)) #4 /var/www/vendor/longman/telegram-bot/src/Telegram.php(415): Longman\\TelegramBot\\Telegram->processUpdate(Object(Longman\\TelegramBot\\Entities\\Update)) #5 /var/www/app/Http/Controllers/Telegram/TelegramBotApiController.php(35): Longman\\TelegramBot\\Telegram->handle() #6 [internal function]: App\\Http\\Controllers\\Telegram\\TelegramBotApiController->webhook(Object(Illuminate\\Http\\Request)) |
RAW update (if available) | {[2019-08-27 21:23:12] local.INFO: {"update_id":44388795, "poll":{"id":"5418177647077228546","question":"Test?","options":[{"text":"Yes","voter_count":1},{"text":"No","voter_count":0}],"is_closed":false}}} |
Summary
I just create a poll in the telegram group using other library with my bot token.
Current behaviour
The bot library can't handle the poll update from Telegram.
How to reproduce
Create a poll in the telegram group using bot token (or maybe manually too).
Expected behaviour
The bot successfully handle poll update and don't throw SQL error.