diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -225,7 +225,7 @@ static function error($p = array(), $body = null, $to = null) # $body and $to de $body .= $_COOKIE ? "\$_COOKIE: " . var_export($_COOKIE, true) . "\n\n" : ""; $body .= $_SERVER ? "\$_SERVER: " . var_export($_SERVER, true) . "\n\n" : ""; $body .= $fulltrace ? "Stack: " . print_r($fulltrace, true) . "\n\n" : ""; - $body = it::replace(array('(pw|passw|password|secret)\] => .*' => '$1] => ********'), $body); + $body = it::replace(array('(pw|passw|password|secret)\] => .*' => '$1] => ********'), $body, array('utf8' => false)); } it::mail(array('To' => $p['to'], 'Subject' => substr($p['title'], 0, 80), 'Body' => $body, 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'], 'forcemail' => !it::is_devel())); @@ -239,12 +239,8 @@ static function error($p = array(), $body = null, $to = null) # $body and $to de if ($_SERVER['REMOTE_ADDR']) error_log("it::error: " . $p['title'] . " Url: $url"); - if (($fh = fopen("/tmp/alertdata/alert.log", "a"))) - { - fputs($fh, it::date() . " " . $p['title'] . " in " . ($trace ? $trace : "{$p['file']}:{$p['line']} Url: $url") . "\n"); - fclose($fh); - @chmod("/tmp/alertdata/alert.log", 0777); - } + file_put_contents("/tmp/alertdata/alert.log", it::date() . " " . $p['title'] . " in " . ($trace ? $trace : "{$p['file']}:{$p['line']} Url: $url") . "\n", FILE_APPEND); + @chmod("/tmp/alertdata/alert.log", 0777); } |