diff options
author | Urban Müller | 2016-08-16 16:10:21 +0200 |
---|---|---|
committer | Urban Müller | 2016-08-16 16:10:21 +0200 |
commit | 715b517eca04786afa70a12291e0d6ac67b6da38 (patch) | |
tree | e470d492caa674211856eb9e9c842e6063d3879b | |
parent | 3f79d2245a89f7b99a347274e71648293a53dbb2 (diff) | |
download | itools-715b517eca04786afa70a12291e0d6ac67b6da38.tar.gz itools-715b517eca04786afa70a12291e0d6ac67b6da38.tar.bz2 itools-715b517eca04786afa70a12291e0d6ac67b6da38.zip |
@ should suppress all error output, even interactive one
-rw-r--r-- | it.class | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -132,6 +132,9 @@ static function error($p = array()) { $p = is_array($p) ? $p : array('title' => $p); + if (!error_reporting()) # called with @ + return null; + if ($_SERVER['REMOTE_ADDR']) $url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; # we ignore https for easier debugging else @@ -169,7 +172,7 @@ static function error($p = array()) if ($toscreen && !it::is_live()) $GLOBALS['debug_noredir'] = 1; - if (error_reporting() && !$toscreen) # not called with @ and this error can only be sent by mail: find out if we want to suppress it + if (!$toscreen) # this error can only be sent by mail: find out if we want to suppress it { if (!$p['id']) $sendmail = true; |