Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1375076
D38.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 1, 6:29 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Mon, Feb 2, 6:29 AM (43 m, 12 s)
Engine
blob
Format
Raw Data
Handle
884180
Attached To
D38: INP-1402 - Use "call_user_func" in System Log
D38.diff
View Options
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
Log In to Comment