FastFix to Critical Error.#1467
Merged
TiiFuchs merged 2 commits intophp-telegram-bot:developfrom May 28, 2024
Merged
Conversation
DB.php didn't work because old deprecated methods
Contributor
Author
|
Bug fixed just for now. Maybe somwere there is more deprecated methods. |
Member
|
I'm looking into it |
Member
|
There were imports missing and a few cases. I added those. Thanks for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DB.php didn't work because old deprecated methods
[27-May-2024 22:06:14 UTC] PHP Fatal error: Uncaught TypeError: Longman\TelegramBot\DB::insertUser(): Argument #1 ($user) must be of type Longman\TelegramBot\Entities\User, array given, called in /vendor/longman/telegram-bot/src/DB.php on line 1279 and defined in /vendor/longman/telegram-bot/src/DB.php:416
Stack trace:
#0 /vendor/longman/telegram-bot/src/DB.php(1279): Longman\TelegramBot\DB::insertUser()
#1 /vendor/longman/telegram-bot/src/DB.php(575): Longman\TelegramBot\DB::insertMessageRequest()
#2 /vendor/longman/telegram-bot/src/Telegram.php(655): Longman\TelegramBot\DB::insertRequest()
#3 /vendor/longman/telegram-bot/src/Telegram.php(568): Longman\TelegramBot\Telegram->processUpdate()
#4 /vendor/php-telegram-bot/telegram-bot-manager/src/BotManager.php(418): Longman\TelegramBot\Telegram->handle()
#5 /vendor/php-telegram-bot/telegram-bot-manager/src/BotManager.php(266): TelegramBot\TelegramBotManager\BotManager->handleWebhook()
#6 /vendor/php-telegram-bot/telegram-bot-manager/src/BotManager.php(106): TelegramBot\TelegramBotManager\BotManager->handleRequest()
#7 /manager.php(36): TelegramBot\TelegramBotManager\BotManager->run()
#8 {main}
thrown in /vendor/longman/telegram-bot/src/DB.php on line 416
Summary
At least now it's working. And clean DB starts getting data on any forward