diff options
-rw-r--r-- | it.class | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -159,6 +159,10 @@ static function error($p = array()) $p = $origp = (array)$p; $p['title'] = $p[0] ?: $p['title']; # handle 'it_error' => "oops" that was cast to array on the way + foreach (array_slice(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10), 1) as $level) + if ($level["class"] . $level["type"] . $level["function"] == "it::error") + return null; # prevent recursion + if (!error_reporting() || $p[0] === false || $p['title'] === false) # called with @ or suppressed return null; |