diff options
author | Urban Müller | 2021-06-17 17:41:45 +0200 |
---|---|---|
committer | Urban Müller | 2021-06-17 17:41:45 +0200 |
commit | 7003b47cc2654bff679a44bccd0ff8d57528378d (patch) | |
tree | 5555f27e8fa7a4ab1d795355a49452b8134d1238 /it.class | |
parent | d010a9e036f9ed4b8bcd4674e1e99bde7ecf081e (diff) | |
download | itools-7003b47cc2654bff679a44bccd0ff8d57528378d.tar.gz itools-7003b47cc2654bff679a44bccd0ff8d57528378d.tar.bz2 itools-7003b47cc2654bff679a44bccd0ff8d57528378d.zip |
support testing for errs
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -164,6 +164,10 @@ static function error($p = array(), $extra = null) $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) ?: substr($p['title'], 0, 2000); + $GLOBALS['ULTRAERROR'] = $p['title']; + if ($GLOBALS['ULTRANOERRORS']) + return null; + if ($extra) $p = ['title' => 'extraneous params passed to it::error', 'fatal' => $p['fatal']]; |