1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-21 16:46:11 +02:00

Ignore "call_user_func" from debug backtrace

Helps make this compliant where there is no class defined
This commit is contained in:
Liam Le Brun
2015-07-15 12:48:57 +01:00
parent c5b08724f4
commit ac8afbf9a9

View File

@@ -56,15 +56,20 @@ class IntrospectionProcessor
$i = 0; $i = 0;
while (isset($trace[$i]['class'])) { while (isset($trace[$i]['class']) || $trace[$i]['function'] == 'call_user_func') {
foreach ($this->skipClassesPartials as $part) { if(isset($trace[$i]['class'])) {
if (strpos($trace[$i]['class'], $part) !== false) { foreach ($this->skipClassesPartials as $part) {
$i++; if (strpos($trace[$i]['class'], $part) !== false) {
continue 2; $i++;
} continue 2;
} }
break; }
} } elseif($trace[$i]['function'] == 'call_user_func') {
$i++;
}
break;
}
// we should have the call source now // we should have the call source now
$record['extra'] = array_merge( $record['extra'] = array_merge(