Skip to content

Commit 640c9cf

Browse files
author
Till Brehm
committed
Fixes #6809 Issues when auth.log is not writable
1 parent 462ba38 commit 640c9cf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

interface/lib/app.inc.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,10 @@ public function log($msg, $priority = 0) {
214214

215215
public function auth_log($msg) {
216216
$authlog_handle = fopen($this->_conf['ispconfig_log_dir'].'/auth.log', 'a');
217-
fwrite($authlog_handle, $msg . PHP_EOL);
218-
fclose($authlog_handle);
217+
if($authlog_handle) {
218+
fwrite($authlog_handle, $msg . PHP_EOL);
219+
fclose($authlog_handle);
220+
}
219221
}
220222

221223
/** Priority values are: 0 = DEBUG, 1 = WARNING, 2 = ERROR */

0 commit comments

Comments
 (0)