From e7098aae53f9aed2bb63a8ef74bf210b6c344f40 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 19 Sep 2018 15:11:00 +0200 Subject: make sure it::log does not producee @it::fatal in with /opt/ultra binaries --- it.class | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/it.class b/it.class index d62ca1f..6145fe1 100644 --- a/it.class +++ b/it.class @@ -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 "Internal Server Error"; } -- cgit v1.2.3