summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
Diffstat (limited to 'it.class')
-rw-r--r--it.class14
1 files changed, 4 insertions, 10 deletions
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'])