diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -117,7 +117,8 @@ function timerlog($label = '') /** - * Send verbose error report to browser or (if display_errors is off) by email to .diffnotice guys. All params optional. + * Send verbose error report to browser or (if display_errors is off) by email to .diffnotice gods, SERVER_ADMIN or current user + * All params optional. Single string parameter means 'title'. * @parma $p['title'] error title, one line * @param $p['body'] error body, multiline * @param $p['to'] comma separated recipient list @@ -127,7 +128,7 @@ function timerlog($label = '') * @param $p['backtraceskip'] number of stack levels to drop * @param $p['blockmail'] number of seconds to block mails after having sent a mail [3600] */ -function error($p = array(), $body = "", $to = "") +function error($p = array(), $body = null, $to = null) # $body and $to deprecated { if (!is_array($p)) $p = array('title' => $p, 'body' => $body, 'to' => $to); @@ -138,6 +139,8 @@ function error($p = array(), $body = "", $to = "") $url = $_SERVER['SCRIPT_NAME']; $gods = strtr(trim(@file_get_contents($GLOBALS['ULTRAHOME'] . "/.diffnotice")), array("\n"=>', ')); + if (!$p['to']) + unset($p['to']); # allow defaults to kick in $p += array( 'title' => "it::error", 'to' => $gods ? $gods : ($_SERVER['SERVER_ADMIN'] ? $_SERVER['SERVER_ADMIN'] : get_current_user()), |