diff options
author | Urban Müller | 2014-03-05 16:04:31 +0100 |
---|---|---|
committer | Urban Müller | 2014-03-05 16:04:31 +0100 |
commit | d1b74acb0d87b50c9447504edd811032fdbbaa71 (patch) | |
tree | 4e1d38a2a63a3c87a39e42f11e17a88b8ef9c29c | |
parent | 2e40c7f77ee66f83586cbd7c2b5d90cadd93144f (diff) | |
download | itools-d1b74acb0d87b50c9447504edd811032fdbbaa71.tar.gz itools-d1b74acb0d87b50c9447504edd811032fdbbaa71.tar.bz2 itools-d1b74acb0d87b50c9447504edd811032fdbbaa71.zip |
remove support for deprecated it::error usage
-rw-r--r-- | it.class | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -109,7 +109,7 @@ static function timerlog($label = '') /** * Send verbose error report to browser or (if display_errors is off) by email to .diffnotice gods, file owner or SERVER_ADMIN - * All params optional. Single string parameter means 'title'. + * @param $p either error title or assoc array of params, see below * @param $p['title'] error title, one line * @param $p['body'] error body, multiline * @param $p['to'] comma separated recipient list @@ -125,14 +125,8 @@ static function timerlog($label = '') * @param $p['omitdebuginfo'] value 1 omits long stack and var dumps, value 2 also omits trace and url * @return true if a mail was sent */ -static function error($p = array(), $body = null, $to = null) # $body and $to deprecated +static function error($p = array()) { - if ($body || $to) - it::error("deprecated usage of it::error"); - - if (!is_array($p)) - $p = array('title' => $p, 'body' => $body, 'to' => $to); - if ($_SERVER['REMOTE_ADDR']) $url = ($_SERVER['HTTPS'] ? "https://" : "http://") . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; else @@ -258,9 +252,9 @@ static function error($p = array(), $body = null, $to = null) # $body and $to de * Same as it::error(), plus exit * @see error() */ -static function fatal($title='', $body='', $to='') +static function fatal($p) { - $p = is_array($title) ? $title : array('title' => $title, 'body' => $body, 'to' => $to); + $p = is_array($p) ? $p : array('title' => $p); $p['backtraceskip']++; it::error($p); if ($_SERVER['REMOTE_ADDR']) |