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

Fix PHP Error - Call to a member function getChat() on null #1456

Open
AkramiPro opened this issue Apr 28, 2024 · 0 comments
Open

Fix PHP Error - Call to a member function getChat() on null #1456

AkramiPro opened this issue Apr 28, 2024 · 0 comments
Labels

Comments

@AkramiPro
Copy link
Contributor

🐞 Bug Report

Required Information

? !
Operating system android 12
PHP Telegram Bot version 0.82.0
PHP version 8.2
MySQL version none
Update Method Webhook
Self-signed certificate no

Summary

in some case maybe users want to edit command and when the commend edited the $this->getMessage() return null and must use $this->getEditedMessage() to fix this issue

How to reproduce

for example send /whois 1234 and then edit the message to /whois 5678

Expected behaviour

it must resend the result base on new message edited

Current behaviour

Error - Call to a member function getChat() on null;
File: vendor/longman/telegram-bot/src/Commands/AdminCommands/WhoisCommand.php; Line: 65;
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

1 participant