Commit 287b34d6 authored by Ad Schellevis's avatar Ad Schellevis

(legacy) fix for crashreport ....failed to open stream: No such file or...

(legacy) fix for crashreport ....failed to open stream: No such file or directory in /usr/local/www/guiconfig.inc on line 361
parent 7c39adf7
...@@ -358,11 +358,13 @@ function clear_log($logfile, $restart_syslogd = true) ...@@ -358,11 +358,13 @@ function clear_log($logfile, $restart_syslogd = true)
} }
/* preserve file ownership and permissions */ /* preserve file ownership and permissions */
if (file_exists($logfile)) {
$handle = fopen($logfile, 'r+'); $handle = fopen($logfile, 'r+');
if ($handle) { if ($handle) {
ftruncate($handle, 0); ftruncate($handle, 0);
fclose($handle); fclose($handle);
} }
}
if ($restart_syslogd) { if ($restart_syslogd) {
system_syslogd_start(); system_syslogd_start();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment