From 1e1ccf69633070beaf638eeb6712962ad361a48a Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 12 May 2020 02:43:07 +0200 Subject: optionally add global extra info to all errs --- it.class | 3 +++ 1 file changed, 3 insertions(+) diff --git a/it.class b/it.class index b3505ea..a4341ae 100644 --- a/it.class +++ b/it.class @@ -21,6 +21,8 @@ class it { +static $error_context; # Text that will be added to all it_error mails + /** * Create config class with static members initialized (e.g. $home). * NOTE: PHP5 ONLY @@ -258,6 +260,7 @@ static function error($p = array()) ($trace ? ($sendmail ? "" : " ") . "Trace: $trace\n\n" : "")) . (!$sendmail || $p['omitdebuginfo'] >= 2 ? "" : "Host: " . getenv('HOSTNAME') . "\n\n") . (!$sendmail || $p['omitdebuginfo'] >= 2 ? "" : "Time: " . date("Y-m-d H:i:s") . (($t = time() - $_SERVER['REQUEST_TIME']) ? " (invoked {$t}s before)" : "") . "\n\n") . # no it::date() due to time- debug param + self::$error_context . ($p['body'] ? ($p['omitdebuginfo'] ? "" : "Body:\n") . trim($p['body'])."\n\n" : ""); if ($sendmail) # we're mailing: send maximum info -- cgit v1.2.3