Skip to content

Commit a5d7a27

Browse files
committed
[zendframework#2679] Bitwise op instead of comparison
- Unable to write a test for this, because when running the test suite, the condition will always evaluate true due to the fact that error_reporting is always dialed to the maximum.
1 parent 44bfeb8 commit a5d7a27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/Zend/Log/Logger.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ public static function registerErrorHandler(Logger $logger)
380380
set_error_handler(function($errno, $errstr, $errfile, $errline, $errcontext) use ($errorHandlerMap, $logger) {
381381
$errorLevel = error_reporting();
382382

383-
if ($errorLevel && $errno) {
383+
if ($errorLevel & $errno) {
384384
if (isset($errorHandlerMap[$errno])) {
385385
$priority = $errorHandlerMap[$errno];
386386
} else {

0 commit comments

Comments
 (0)