You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTICE: PHP message: PHP Fatal error: Uncaught Error: Class "WeStacks\TeleBot\Traits\get_class" not found in /var/www/vendor/westacks/telebot/src/Traits/HandlesUpdates.php:40
The PHP have a strange behavior for such syntax. Tested some stuff in sandbox and that's what I discovered:
PHP <= 7.4
<?php$class = new (get_class(newException)));
Gives error:
Parse error: syntax error, unexpected '(' in test.php on line 4
Process exited with code 255.
However, it works for PHP => 8.0.
PHP 8.1
<?php$class = new get_class(newException);
Gives error:
Fatal error: Uncaught Error: Class "get_class" not found in test.php:4
Stack trace:
#0 {main}
thrown in /in/CPRRi on line 4
Process exited with code 255.
However, it works for PHP <= 8.0.
Fix
In version 2, the kernel object will be reworked, and the issue will be resolved by itself, but for now something like this will fix the issue:
Laravel v8.80.0 (PHP v8.1.1)
Looks like this commit is wrong 76f9607
The text was updated successfully, but these errors were encountered: