From: Tim Düsterhus Date: Wed, 13 Apr 2016 15:59:36 +0000 (+0200) Subject: Fix signature of logThrowable X-Git-Tag: 3.0.0_Beta_1~1909 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8891d4b9315f788d18fcb4a0dafe660b2521c7de;p=GitHub%2FWoltLab%2FWCF.git Fix signature of logThrowable see 614e246665775cdde5d85a623f450988e21d6382 --- diff --git a/wcfsetup/install/files/lib/core.functions.php b/wcfsetup/install/files/lib/core.functions.php index 6b0832c0c4..432b136bb6 100644 --- a/wcfsetup/install/files/lib/core.functions.php +++ b/wcfsetup/install/files/lib/core.functions.php @@ -49,7 +49,8 @@ namespace wcf\functions\exception { use wcf\util\FileUtil; use wcf\util\StringUtil; - function logThrowable($logFile, $e) { + function logThrowable($e, $logFile = null) { + if ($logFile === null) $logFile = WCF_DIR . 'log/' . gmdate('Y-m-d', TIME_NOW) . '.txt'; touch($logFile); // don't forget to update ExceptionLogViewPage, when changing the log file format @@ -96,8 +97,7 @@ namespace wcf\functions\exception { } function printThrowable($e) { - $logFile = WCF_DIR . 'log/' . gmdate('Y-m-d', TIME_NOW) . '.txt'; - $exceptionID = logThrowable($logFile, $e); + $exceptionID = logThrowable($e); $exceptionTitle = $exceptionSubtitle = $exceptionExplanation = ''; $logFile = sanitizePath($logFile);