aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ0WI <J0WI@users.noreply.github.com>2020-07-03 20:53:54 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-08-12 01:26:10 +0000
commit9b028a619a4b25272bf7b63da7aa1f525329e511 (patch)
treee36589cc6de6e5124bcbf72b6300b362ff0d8125
parenteded52eae70e83fdca65ee87271787d99ac60d1b (diff)
downloadnextcloud-server-9b028a619a4b25272bf7b63da7aa1f525329e511.tar.gz
nextcloud-server-9b028a619a4b25272bf7b63da7aa1f525329e511.zip
Fix chmod on file descriptor
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
-rw-r--r--lib/private/Log/File.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php
index 6be200f6d3e..9e9abb11484 100644
--- a/lib/private/Log/File.php
+++ b/lib/private/Log/File.php
@@ -82,7 +82,7 @@ class File extends LogDetails implements IWriter, IFileBased {
public function write(string $app, $message, int $level) {
$entry = $this->logDetailsAsJSON($app, $message, $level);
$handle = @fopen($this->logFile, 'a');
- if ($this->logFileMode > 0 && (fileperms($this->logFile) & 0777) != $this->logFileMode) {
+ if ($this->logFileMode > 0 && is_file($this->logFile) && (fileperms($this->logFile) & 0777) != $this->logFileMode) {
@chmod($this->logFile, $this->logFileMode);
}
if ($handle) {