Page MenuHomeIn-Portal Phabricator

D38.diff
No OneTemporary

File Metadata

Created
Sun, Feb 1, 6:29 AM

D38.diff

Index: branches/5.2.x/core/kernel/utility/logger.php
===================================================================
--- branches/5.2.x/core/kernel/utility/logger.php
+++ branches/5.2.x/core/kernel/utility/logger.php
@@ -24,7 +24,6 @@
*/
const DB_ERROR_PREFIX = 'SQL Error:';
-
/**
* Logger state: logging of errors and user-defined messages
*/
@@ -40,7 +39,6 @@
*/
const STATE_DISABLED = 0;
-
/**
* Log store: automatically determine where log should be written
*/
@@ -56,7 +54,6 @@
*/
const LS_DISK = 3;
-
/**
* Log level: system is unusable
*/
@@ -97,7 +94,6 @@
*/
const LL_DEBUG = 7;
-
/**
* Log type: PHP related activity
*/
@@ -113,7 +109,6 @@
*/
const LT_OTHER = 3;
-
/**
* Log interface: Front
*/
@@ -139,7 +134,6 @@
*/
const LI_API = 5;
-
/**
* Log notification status: disabled
*/
@@ -1248,17 +1242,9 @@
$log->write();
$res = false;
- /* @var $handler Closure */
foreach ($this->_handlers as $handler) {
- if ( is_array($handler) ) {
- $object =& $handler[0];
- $method = $handler[1];
- $res = $object->$method($errno, $errstr, $errfile, $errline, $errcontext);
- }
- else {
- $res = $handler($errno, $errstr, $errfile, $errline, $errcontext);
- }
+ $res = call_user_func($handler, $errno, $errstr, $errfile, $errline, $errcontext);
}
return $res;
@@ -1347,19 +1333,11 @@
$log->write();
$res = false;
- /* @var $handler Closure */
foreach ($this->_handlers as $handler) {
- if ( is_array($handler) ) {
- $object =& $handler[0];
- $method = $handler[1];
- $res = $object->$method($exception);
- }
- else {
- $res = $handler($exception);
- }
+ $res = call_user_func($handler, $exception);
}
return $res;
}
-}
\ No newline at end of file
+}

Event Timeline