Skip to content

Commit 3361d78

Browse files
author
Till Brehm
committed
Merge branch '6809-issues-when-auth-log-is-not-writable' into 'develop'
Resolve "Issues when auth.log is not writable" Closes #6809 See merge request ispconfig/ispconfig3!1993
2 parents 39f9be1 + 640c9cf commit 3361d78

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)