mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
"adding line numbers to call-tree"
This commit is contained in:
parent
d8d677864e
commit
0406f55d97
@ -1239,11 +1239,12 @@ function function_backtrace($remove=0)
|
|||||||
{
|
{
|
||||||
$backtrace = debug_backtrace();
|
$backtrace = debug_backtrace();
|
||||||
//echo "function_backtrace($remove)<pre>".print_r($backtrace,True)."</pre>\n";
|
//echo "function_backtrace($remove)<pre>".print_r($backtrace,True)."</pre>\n";
|
||||||
foreach($backtrace as $level)
|
foreach($backtrace as $n => $level)
|
||||||
{
|
{
|
||||||
if ($remove-- < 0)
|
if ($remove-- < 0)
|
||||||
{
|
{
|
||||||
$ret[] = (isset($level['class'])?$level['class'].$level['type']:'').$level['function'].
|
$ret[] = (isset($level['class'])?$level['class'].$level['type']:'').$level['function'].
|
||||||
|
($n > 0 ? '('.$backtrace[$n-1]['line'].')' : ''). // add line number of call
|
||||||
(!$level['class'] && !is_object($level['args'][0]) && $level['function'] != 'unserialize' ?
|
(!$level['class'] && !is_object($level['args'][0]) && $level['function'] != 'unserialize' ?
|
||||||
'('.substr(str_replace(EGW_SERVER_ROOT,'',(string)$level['args'][0]),0,64).')' : '');
|
'('.substr(str_replace(EGW_SERVER_ROOT,'',(string)$level['args'][0]),0,64).')' : '');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user