mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 11:04:42 +00:00
(legacy) fix for crashreport ....failed to open stream: No such file or directory in /usr/local/www/guiconfig.inc on line 361
This commit is contained in:
parent
7c39adf71a
commit
287b34d6c8
@ -358,10 +358,12 @@ function clear_log($logfile, $restart_syslogd = true)
|
||||
}
|
||||
|
||||
/* preserve file ownership and permissions */
|
||||
$handle = fopen($logfile, 'r+');
|
||||
if ($handle) {
|
||||
ftruncate($handle, 0);
|
||||
fclose($handle);
|
||||
if (file_exists($logfile)) {
|
||||
$handle = fopen($logfile, 'r+');
|
||||
if ($handle) {
|
||||
ftruncate($handle, 0);
|
||||
fclose($handle);
|
||||
}
|
||||
}
|
||||
|
||||
if ($restart_syslogd) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user