Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'is_closed' #995

Closed
CaliforniaMountainSnake opened this issue Aug 27, 2019 · 2 comments
Labels

Comments

@CaliforniaMountainSnake
Copy link

CaliforniaMountainSnake commented Aug 27, 2019

🐞 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.

@noplanman
Copy link
Member

@CaliforniaMountainSnake Thanks for reporting!

This has popped up in the support group too and will be fixed in the next release 👍

@noplanman
Copy link
Member

Fixed in 0.61.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants