Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1046441
D261.id.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
Sat, Jun 28, 7:13 PM
Size
1 KB
Mime Type
text/x-diff
Expires
Sun, Jun 29, 7:13 PM (5 h, 48 m)
Engine
blob
Format
Raw Data
Handle
676497
Attached To
D261: INP-1502 - Gracefully handle case of missing file/line keys in stack trace info
D261.id.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
@@ -198,12 +198,18 @@
protected $_debugMode = false;
/**
- * Ignores backtrace record where following files are mentioned
+ * Ignores backtrace record where following classes/files are mentioned
*
- * @var Array
- * @access protected
+ * @var array
*/
- protected $_ignoreInTrace = Array ('logger.php', 'db_connection.php', 'db_load_balancer.php');
+ protected $_ignoreInTrace = array(
+ 'kLogger' => 'logger.php',
+ 'kErrorHandlerStack' => 'logger.php',
+ 'kExceptionHandlerStack' => 'logger.php',
+ 'kDBConnection' => 'db_connection.php',
+ 'kDBConnectionDebug' => 'db_connection.php',
+ 'kDBLoadBalancer' => 'db_load_balancer.php',
+ );
/**
* Create event log
@@ -581,11 +587,14 @@
}
if ( isset($files) && is_array($files) ) {
- while (true) {
+ $classes = array_keys($files);
+
+ while ( true ) {
$trace_info = $trace[0];
$file = isset($trace_info['file']) ? basename($trace_info['file']) : '';
+ $class = isset($trace_info['class']) ? $trace_info['class'] : '';
- if ( !in_array($file, $files) ) {
+ if ( ($file && !in_array($file, $files)) || ($class && !in_array($class, $classes)) ) {
break;
}
Event Timeline
Log In to Comment