php-telegram-bot / core

PHP Telegram Bot based on the official Telegram Bot API
MIT License
3.9k stars 953 forks source link

DB fatal error after forward photo to bot! #37

Closed WISTFUL12 closed 9 years ago

WISTFUL12 commented 9 years ago

I forwarded one photo from a third person to my bot and now when I try to run "getUpdatesCLI.php", below error added on error log:

[18-Sep-2015 10:54:19] PHP Catchable fatal error: Object of class Longman\TelegramBot\Entities\User could not be converted to string in /home/x/xxx.com/telegram/vendor/longman/telegram-bot/src/DB.php on line 230

WISTFUL12 commented 9 years ago

I temporary edit DB.php on line 217 with "$forward_from = '123';" and run "getUpdatesCLI.php" again. Now problem temporary solved!

WISTFUL12 commented 9 years ago

Also this issue occurred after forwarding text (no photo) to bot until do post 2 temp solution...

MBoretto commented 9 years ago

Thanks for reporting I push the fix on the branch hotfix.