Skip to content

Commit

Permalink
Copy the static $errorPriorityMap to a scoped variable with the same …
Browse files Browse the repository at this point in the history
…name and use it within the error/exception handler
  • Loading branch information
marc-mabe committed Jun 8, 2013
1 parent 5057aa0 commit cb413ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/Zend/Log/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -517,16 +517,16 @@ public static function registerErrorHandler(Logger $logger, $continueNativeHandl
return false;
}

$errorHandlerMap = static::$errorPriorityMap;
$errorPriorityMap = static::$errorPriorityMap;

$previous = set_error_handler(function ($level, $message, $file, $line)
use ($logger, $errorHandlerMap, $continueNativeHandler)
use ($logger, $errorPriorityMap, $continueNativeHandler)
{
$iniLevel = error_reporting();

if ($iniLevel & $level) {
if (isset(Logger::$errorPriorityMap[$level])) {
$priority = $errorHandlerMap[$level];
if (isset($errorPriorityMap[$level])) {
$priority = $errorPriorityMap[$level];
} else {
$priority = Logger::INFO;
}
Expand Down

0 comments on commit cb413ef

Please sign in to comment.