aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ0WI <J0WI@users.noreply.github.com>2020-07-03 20:53:54 +0200
committerJ0WI <J0WI@users.noreply.github.com>2020-07-03 20:53:58 +0200
commit6ca1599ea4327e7a30afa89a7ec08898edb5bc66 (patch)
tree73d424292d9396df98f47eca3a9c667fa2f08092
parentb6bbc709b21817f207e963394ba891391fbb8079 (diff)
downloadnextcloud-server-6ca1599ea4327e7a30afa89a7ec08898edb5bc66.tar.gz
nextcloud-server-6ca1599ea4327e7a30afa89a7ec08898edb5bc66.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) {