Skip to content

Commit

Permalink
fix(core): correctly suppress notices when asked
Browse files Browse the repository at this point in the history
Correctly listen to the @-operator
  • Loading branch information
jeabakker committed Feb 25, 2022
1 parent bbd0843 commit b5ef29c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion engine/classes/Elgg/Application/ErrorHandler.php
Expand Up @@ -61,7 +61,11 @@ public function __invoke($errno, $errmsg, $filename = '', $linenum = 0) {
break;

default:
$this->log(LogLevel::NOTICE, "PHP NOTICE: $error");
// check if the error wasn't suppressed by the error control operator (@)
if (error_reporting()) {
$this->log(LogLevel::NOTICE, "PHP NOTICE: $error");
}

break;
}

Expand Down

0 comments on commit b5ef29c

Please sign in to comment.