$func['database'] = in_array($func['class'], ['Friendica\Database\DBA', 'Friendica\Database\Database']);
if (!$previous['database'] || !$func['database']) {
$classparts = explode("\\", $func['class']);
- $callstack[] = array_pop($classparts).'::'.$func['function'] . '(' . $func['line'] . ')';
+ $callstack[] = array_pop($classparts).'::'.$func['function'] . (isset($func['line']) ? ' (' . $func['line'] . ')' : '');
$previous = $func;
}
} elseif (!in_array($func['function'], $ignore)) {
$func['database'] = ($func['function'] == 'q');
- $callstack[] = $func['function'] . '(' . $func['line'] . ')';
+ $callstack[] = $func['function'] . (isset($func['line']) ? ' (' . $func['line'] . ')' : '');
$func['class'] = '';
$previous = $func;
}