Merge pull request #13 from apeschar/console-error-suppression

Fix error suppression (`@` operator) in console
This commit is contained in:
Kamil Wylegala 2022-03-02 15:27:14 +01:00 committed by GitHub
commit ead607a92d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -55,6 +55,10 @@ It means that composer will look at `master` branch of repository configured und
## Changelog ## Changelog
### 2022-03-02
- Fixed `ConsoleErrorHandler::handleError` to respect error suppression.
### 2022-01-31 ### 2022-01-31
- Fixed `Folder->read`, `array_values` is used to remove keys to prevent usign named arguments in `call_user_func_array` - Fixed `Folder->read`, `array_values` is used to remove keys to prevent usign named arguments in `call_user_func_array`

View file

@ -75,7 +75,7 @@ class ConsoleErrorHandler {
* @return void * @return void
*/ */
public function handleError($code, $description, $file = null, $line = null, $context = null) { public function handleError($code, $description, $file = null, $line = null, $context = null) {
if (error_reporting() === 0) { if (!(error_reporting() & $code)) {
return; return;
} }
$stderr = static::getStderr(); $stderr = static::getStderr();