From a0bc3ed10e352bc1e95859869ef0866f32f0c843 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 23 Aug 2017 17:40:17 +0200 Subject: always provide trace for error grepping --- it.class | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'it.class') diff --git a/it.class b/it.class index 2d233e6..5246336 100644 --- a/it.class +++ b/it.class @@ -174,6 +174,7 @@ static function error($p = array()) if (it::match('-', $p['timewindow']) && ($parts = explode("-", $p['timewindow']))) list($p['graceperiod'], $p['timewindow']) = [$parts[0], $parts[1] - $parts[0]]; $p += array('blockmailid' => $GLOBALS['ULTRASITE'] . "." . md5($p['to'])); + $trace = it_debug::backtrace(array('skiplevels' => $p['backtraceskip'], 'skipfiles' => $p['skipfiles'])); # moved in here for performance in mass error case @mkdir("/tmp/alertdata"); @chmod("/tmp/alertdata", 0777); @@ -224,8 +225,6 @@ static function error($p = array()) if ($toscreen || $sendmail) { - $trace = it_debug::backtrace(array('skiplevels' => $p['backtraceskip'], 'skipfiles' => $p['skipfiles'])); # moved in here for performance in mass error case - $p['body'] = is_string($p['body']) || !array_key_exists('body', $p) ? $p['body'] : var_export($p['body'], true); if (strlen($p['body']) > 500000) { -- cgit v1.2.3