Skip to content

Commit

Permalink
[zendframework#2679] Bitwise op instead of comparison
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
weierophinney committed Oct 17, 2012
1 parent 44bfeb8 commit a5d7a27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Zend/Log/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public static function registerErrorHandler(Logger $logger)
set_error_handler(function($errno, $errstr, $errfile, $errline, $errcontext) use ($errorHandlerMap, $logger) {
$errorLevel = error_reporting();

if ($errorLevel && $errno) {
if ($errorLevel & $errno) {
if (isset($errorHandlerMap[$errno])) {
$priority = $errorHandlerMap[$errno];
} else {
Expand Down

0 comments on commit a5d7a27

Please sign in to comment.