Skip to content

Commit c6f1cdc

Browse files
samsonasikondrejmirtes
authored andcommitted
Silent @ operator should use & $errno check
1 parent 75fe4ef commit c6f1cdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Analyser/Analyser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private function collectErrors(array $analysedFiles): void
135135
{
136136
$this->collectedErrors = [];
137137
set_error_handler(function (int $errno, string $errstr, string $errfile, int $errline) use ($analysedFiles): bool {
138-
if (error_reporting() === 0) {
138+
if ((error_reporting() & $errno) === 0) {
139139
// silence @ operator
140140
return true;
141141
}

0 commit comments

Comments
 (0)