diff options
author | Urban Müller | 2018-09-19 15:11:00 +0200 |
---|---|---|
committer | Urban Müller | 2018-09-19 15:11:00 +0200 |
commit | e7098aae53f9aed2bb63a8ef74bf210b6c344f40 (patch) | |
tree | c9a8a9e5bfea51c6f9b15111b9156bca99522868 | |
parent | 8ee4a71bdebcf3e7b3d64e582640f24f81023160 (diff) | |
download | itools-e7098aae53f9aed2bb63a8ef74bf210b6c344f40.tar.gz itools-e7098aae53f9aed2bb63a8ef74bf210b6c344f40.tar.bz2 itools-e7098aae53f9aed2bb63a8ef74bf210b6c344f40.zip |
make sure it::log does not producee @it::fatal in with /opt/ultra binaries
-rw-r--r-- | it.class | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -87,8 +87,7 @@ static function log($name /* ... */) */ static function log_line($name, $line) { - $log = $GLOBALS['ULTRAHOME'] == "/opt/ultra/bin" ? "../log" : "log"; - $basefn = substr($name, 0, 1) == "/" ? $name : $GLOBALS['ULTRAHOME'] . "/$log/$name"; + $basefn = substr($name, 0, 1) == "/" ? $name : ($GLOBALS['ULTRAHOME'] == "/opt/ultra/bin" ? it::match('/www/[^/]*', getcwd()) : $GLOBALS['ULTRAHOME']) . "/log/$name"; $fullfn = $basefn . "-" . date('Ymd'); if (substr($fullfn, 0, 1) == "/") @@ -241,7 +240,7 @@ static function error($p = array()) if ($p['fatal'] && $_SERVER['REMOTE_ADDR']) { - @http_response_code(500); + http_response_code(500); echo "<!DOCTYPE html><html><head><title></title></head><body>Internal Server Error</body></html>"; } |