Eleirbag89 / TelegramBotPHP

A very simple PHP Telegram Bot API for sending messages.
http://eleirbag89.github.io/TelegramBotPHP
MIT License
800 stars 340 forks source link

You must add array_key_exists for $ this-> updates on line 3078 #209

Closed lyucean closed 4 years ago

lyucean commented 4 years ago

This is where you need to add array_key_exists ('result', $ this-> updates). Otherwise, with an empty $this->updates, we get: Undefined index: result

On php 7.4, this error now appears.

Eleirbag89 commented 4 years ago

It's backward compatible ? Can you do a Pull Request ?

lyucean commented 4 years ago

It's backward compatible ?

Yes, of course, this is all just checking for a key in an array

Can you do a Pull Request ?

https://github.com/Eleirbag89/TelegramBotPHP/pull/213