From d1b74acb0d87b50c9447504edd811032fdbbaa71 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 5 Mar 2014 16:04:31 +0100 Subject: remove support for deprecated it::error usage --- it.class | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'it.class') diff --git a/it.class b/it.class index 7f2dc1e..a5c9bb4 100644 --- a/it.class +++ b/it.class @@ -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']) -- cgit v1.2.3