Instead of fatal error triggering, turn off file logging and log the error elsewhere

This commit is contained in:
Isaac Connor 2021-03-03 14:23:35 -05:00
parent 8aebcf7337
commit de0bbf7e04
1 changed files with 2 additions and 1 deletions

View File

@ -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 ) {