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
Use robo to run code that uses erro silencing operator (@) to silence expected errors
Expected behavior
Silenced errors should not be shown
Actual behavior
Robo outputs silenced error because handleError returns false and error_get_last() inside shutdown handler then return silenced error.
System Configuration
This happens since PHP 8.0 because error_reporting() in error handler for silenced errors does not return 0 as before.
Prior to PHP 8.0.0, the [error_reporting()](https://www.php.net/manual/en/function.error-reporting.php) called inside the custom error handler always returned 0 if the error was suppressed by the @ operator. As of PHP 8.0.0, it returns the value E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | E_PARSE.
Steps to reproduce
Use robo to run code that uses erro silencing operator (@) to silence expected errors
Expected behavior
Silenced errors should not be shown
Actual behavior
Robo outputs silenced error because
handleError
returns false anderror_get_last()
insideshutdown
handler then return silenced error.System Configuration
This happens since PHP 8.0 because
error_reporting()
in error handler for silenced errors does not return 0 as before.See https://www.php.net/manual/en/language.operators.errorcontrol.php
The text was updated successfully, but these errors were encountered: