Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 454ace5

Browse files
committed
Update FirePhp for different debug_backtrace on PHP 7
1 parent d843217 commit 454ace5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

library/Zend/Wildfire/Plugin/FirePhp.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,12 @@ protected function _getStackTrace($options)
532532
isset($trace[0]['file']) && substr($trace[0]['file'], -7, 7)=='Log.php' &&
533533
isset($trace[1]['function']) && $trace[1]['function']=='__call') {
534534

535-
$trace = array_splice($trace, 2);
535+
$spliceOffset = 2;
536+
//Debug backtrace changed in PHP 7.0.0
537+
if (version_compare(PHP_VERSION, '7.0.0', '>=')) {
538+
$spliceOffset = 1;
539+
}
540+
$trace = array_splice($trace, $spliceOffset);
536541
}
537542
}
538543

0 commit comments

Comments
 (0)