summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it.class6
1 files changed, 3 insertions, 3 deletions
diff --git a/it.class b/it.class
index eb7efb6..487508d 100644
--- a/it.class
+++ b/it.class
@@ -155,7 +155,7 @@ static function error($p = array(), $body = null, $to = null) # $body and $to de
@mkdir("/tmp/alertdata");
@chmod("/tmp/alertdata", 0777);
- $toscreen = ini_get('display_errors') || (defined("STDOUT") && posix_isatty(STDOUT)) || EDC('astwin') || EDC('asdevel');
+ $toscreen = !EDC('aslive') && (ini_get('display_errors') || (defined("STDOUT") && posix_isatty(STDOUT)) || EDC('astwin') || EDC('asdevel'));
@fseek(STDOUT, 0, SEEK_END); # Work around PHP bug 49819: posix_isatty seeks to start
if ($toscreen && !it::is_live())
@@ -228,7 +228,7 @@ static function error($p = array(), $body = null, $to = null) # $body and $to de
$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()));
+ it::mail(array('To' => $p['to'], 'Subject' => substr($p['title'], 0, 160), 'Body' => $body, 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'], 'forcemail' => !it::is_devel()));
}
else if ($_SERVER['REMOTE_ADDR']) # toscreen mode: web
echo "<pre>" . htmlspecialchars($p['title'] . "\n" . rtrim($body), ENT_COMPAT, "iso-8859-1") . "</pre>"; # works with iso-8859-1 or utf-8, UTF8SAFE
@@ -236,7 +236,7 @@ static function error($p = array(), $body = null, $to = null) # $body and $to de
error_log(substr($p['title'], 0, 100000) . " in " . ($trace ? $trace : "{$p['file']}:{$p['line']} Url: $url") . " " . (EDC('verbose') ? D($p['locals']) : ""));
}
- if ($_SERVER['REMOTE_ADDR'])
+ if ($_SERVER['REMOTE_ADDR']) # additional entry in log/error_log
error_log("it::error: " . $p['title'] . " Url: $url");
file_put_contents("/tmp/alertdata/alert.log", it::date() . " " . $p['title'] . " in " . ($trace ? $trace : "{$p['file']}:{$p['line']} Url: $url") . "\n", FILE_APPEND);