From 7003b47cc2654bff679a44bccd0ff8d57528378d Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Thu, 17 Jun 2021 17:41:45 +0200 Subject: support testing for errs --- it.class | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/it.class b/it.class index 02f17fb..4ef56b6 100644 --- a/it.class +++ b/it.class @@ -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']]; -- cgit v1.2.3