diff options
author | Urban Müller | 2018-06-27 15:09:12 +0200 |
---|---|---|
committer | Urban Müller | 2018-06-27 15:09:12 +0200 |
commit | 3fc0d00f21b44d44ee1cf0513235e1b51340a290 (patch) | |
tree | fae897e77bd04f8d56928e5a08e98f63d711bf0e | |
parent | ad34103f7af9fb3b1a6830b891aa74a7663960eb (diff) | |
download | itools-3fc0d00f21b44d44ee1cf0513235e1b51340a290.tar.gz itools-3fc0d00f21b44d44ee1cf0513235e1b51340a290.tar.bz2 itools-3fc0d00f21b44d44ee1cf0513235e1b51340a290.zip |
prevent recursion
-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; |