From 1bf1f64969a6270d655e8819258e574b4dcb33e0 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 11 Apr 2018 14:21:00 +0200 Subject: respect omitdebuginfo --- it.class | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'it.class') diff --git a/it.class b/it.class index 2715438..07822a6 100644 --- a/it.class +++ b/it.class @@ -135,7 +135,7 @@ static function timerlog($label = '') * @param $p['skipfiles'] files to skip in backtrace * @param $p['okstate'] give current ok label and ok state, e.g. telresult=1 for working. see failcount * @param $p['failcount'] give number of consecutive okstate failures needed for creating an error [2] - * @param $p['omitdebuginfo'] value 1 omits long stack and var dumps, value 2 also omits trace and url + * @param $p['omitdebuginfo'] value 1 omits long stack and var dumps, value 2 also minimal infos * @param $p['fatal'] exit after displaying error * @return always null (so users can return it::error() in error cases) * @@ -249,8 +249,8 @@ static function error($p = array()) $body = ($p['omitdebuginfo'] >= 2 ? "" : ($url && !$toscreen? "{$p['title']}\n\nUrl: $url\n\n" : "") . ($trace ? ($sendmail ? "" : " ") . "Trace: $trace\n\n" : "")) . - "Host: " . getenv('HOSTNAME') . "\n\n" . - "Time: " . date("Y-m-d H:i:s") . (($t = time() - $_SERVER['REQUEST_TIME']) ? " (started {$t}s before)" : "") . "\n\n" . # no it::date() due to time- debug param + ($p['omitdebuginfo'] >= 2 ? "" : "Host: " . getenv('HOSTNAME') . "\n\n") . + ($p['omitdebuginfo'] >= 2 ? "" : "Time: " . date("Y-m-d H:i:s") . (($t = time() - $_SERVER['REQUEST_TIME']) ? " (started {$t}s before)" : "") . "\n\n") . # no it::date() due to time- debug param ($p['body'] ? ($p['omitdebuginfo'] ? "" : "Body:\n") . trim($p['body'])."\n\n" : ""); if ($sendmail) # we're mailing: send maximum info -- cgit v1.2.3