diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -155,12 +155,15 @@ static function timerlog($label = '') * |graceperiod|timewindow|------> * id x x x m x x x x */ -static function error($p = array()) +static function error($p = array(), $extra = null) { $p = $origp = (array)$p; $p['title'] = $p[0] ?: $p['title']; # handle 'it_error' => "oops" that was cast to array on the way $p['title'] = grapheme_substr($p['title'], 0, 2000); + if ($extra) + it::error('extraneous params passed to it::error'); + 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 |