summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_debug.class3
1 files changed, 2 insertions, 1 deletions
diff --git a/it_debug.class b/it_debug.class
index 89d31e7..b53a192 100644
--- a/it_debug.class
+++ b/it_debug.class
@@ -167,6 +167,7 @@ static function dump($args)
* @param $p['levels'] number of stack levels to return (default: 0 = all)
* @param $p['skiplevels'] number of stack levels to omit
* @param $p['skipfiles'] regular expression of filenames to omit
+ * @param $p['trace'] Stack trace to compact
*/
static function backtrace($p = array())
{
@@ -175,7 +176,7 @@ static function backtrace($p = array())
$p += array('levels' => 0, 'skiplevels'=> 0, 'skipfiles' => "###");
- foreach (array_slice(debug_backtrace(@constant('DEBUG_BACKTRACE_IGNORE_ARGS')), $p['skiplevels']) as $call)
+ foreach ($p['trace'] ?: array_slice(debug_backtrace(@constant('DEBUG_BACKTRACE_IGNORE_ARGS')), $p['skiplevels']) as $call)
{
if (($fn = $call['file']) && !it::match($p['skipfiles'], $call['file']))
{