summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it.class7
1 files changed, 4 insertions, 3 deletions
diff --git a/it.class b/it.class
index 67488a0..64a03c1 100644
--- a/it.class
+++ b/it.class
@@ -157,6 +157,10 @@ static function timerlog($label = '')
static function error($p = array(), $extra = null)
{
$p = $origp = (array)$p;
+
+ if (error_reporting() == @error_reporting() || $p[0] === false || $p['title'] === false) # called with @ or suppressed
+ return $p['fatal'] ? self::_exit($p) : 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);
@@ -167,9 +171,6 @@ static function error($p = array(), $extra = null)
if ($level["class"] . $level["type"] . $level["function"] == "it::error")
return null; # prevent recursion
- if (error_reporting() == @error_reporting() || $p[0] === false || $p['title'] === false) # called with @ or suppressed
- return $p['fatal'] ? self::_exit($p) : null;
-
if ($_SERVER['REMOTE_ADDR'])
$url = "http://" . it::replace([':443$' => ""], $_SERVER['HTTP_HOST']) . $_SERVER['REQUEST_URI']; # we ignore https for easier debugging
else