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

FastFix to Critical Error. #1467

Merged
merged 2 commits into from
May 28, 2024
Merged

Conversation

r3bers
Copy link
Contributor

@r3bers r3bers commented May 27, 2024

DB.php didn't work because old deprecated methods

? !
Type bug
BC Break yes / no
Fixed issues
Didn't find opened issues

[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

DB.php didn't work because old deprecated methods
@r3bers
Copy link
Contributor Author

r3bers commented May 27, 2024

Bug fixed just for now. Maybe somwere there is more deprecated methods.

@TiiFuchs
Copy link
Member

I'm looking into it

@TiiFuchs
Copy link
Member

There were imports missing and a few cases. I added those. Thanks for your contribution!

@TiiFuchs TiiFuchs merged commit c3e099e into php-telegram-bot:develop May 28, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants