diff --git a/README.md b/README.md index 7ac89c117..19667e602 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,10 @@ It means that composer will look at `master` branch of repository configured und ## Changelog +### 2022-03-02 + +- Fixed `ConsoleErrorHandler::handleError` to respect error suppression. + ### 2022-01-31 - Fixed `Folder->read`, `array_values` is used to remove keys to prevent usign named arguments in `call_user_func_array` diff --git a/lib/Cake/Console/ConsoleErrorHandler.php b/lib/Cake/Console/ConsoleErrorHandler.php index 3df0bf734..3956e5ab8 100644 --- a/lib/Cake/Console/ConsoleErrorHandler.php +++ b/lib/Cake/Console/ConsoleErrorHandler.php @@ -75,7 +75,7 @@ class ConsoleErrorHandler { * @return void */ public function handleError($code, $description, $file = null, $line = null, $context = null) { - if (error_reporting() === 0) { + if (!(error_reporting() & $code)) { return; } $stderr = static::getStderr();