From de0bbf7e046879dfcbc8b98a6e2ba35b73e6caff Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 3 Mar 2021 14:23:35 -0500 Subject: [PATCH] Instead of fatal error triggering, turn off file logging and log the error elsewhere --- web/includes/logger.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/includes/logger.php b/web/includes/logger.php index c6a629327..02da47a15 100644 --- a/web/includes/logger.php +++ b/web/includes/logger.php @@ -397,7 +397,8 @@ class Logger { if ( !error_log($message."\n", 3, $this->logFile) ) { if ( strnatcmp(phpversion(), '5.2.0') >= 0 ) { $error = error_get_last(); - trigger_error("Can't write to log file '".$this->logFile."': ".$error['message'].' @ '.$error['file'].'/'.$error['line'], E_USER_ERROR); + $this->fileLevel = self::NOLOG; + Error("Can't write to log file '".$this->logFile."': ".$error['message'].' @ '.$error['file'].'/'.$error['line'], E_USER_ERROR); } } } else if ( $this->logFd ) {