Merge pull request #3310 from duritong/patch-1
only chmod logfile if necessary
This commit is contained in:
commit
52eaf6cfbb
|
@ -119,7 +119,9 @@ class File {
|
|||
);
|
||||
$entry = json_encode($entry);
|
||||
$handle = @fopen(self::$logFile, 'a');
|
||||
@chmod(self::$logFile, 0640);
|
||||
if ((fileperms(self::$logFile) & 0777) != 0640) {
|
||||
@chmod(self::$logFile, 0640);
|
||||
}
|
||||
if ($handle) {
|
||||
fwrite($handle, $entry."\n");
|
||||
fclose($handle);
|
||||
|
|
Loading…
Reference in New Issue