From 60e28a1e3e8cf7aa4a49dc440393b501e1b22424 Mon Sep 17 00:00:00 2001 From: Albert Peschar Date: Wed, 2 Mar 2022 15:57:10 +0200 Subject: [PATCH 1/2] Handle error suppression in ConsoleErrorHandler --- lib/Cake/Console/ConsoleErrorHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); From ec0f1811eb19c92a58bb0dc9b6187337d642c2f6 Mon Sep 17 00:00:00 2001 From: Albert Peschar Date: Wed, 2 Mar 2022 15:58:19 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) 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`