diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2021-05-21 15:50:04 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 15:50:04 +0300 |
commit | fb1362ee30cbf827be47bd64fa8312801830f4f9 (patch) | |
tree | cec40a1ce158d7c551ea7f3a0142228cb4f8621e | |
parent | b13dbbb9d782887e791a5e46c08df3868e4b874e (diff) | |
parent | 36acbd9efb8a214f11bcbb6ef44d395d9c614481 (diff) |
Merge pull request #27058 from nextcloud/backport/27032/stable21
[stable21] Fix filesize error on log rotation, if file does not exist
-rw-r--r-- | lib/public/Log/RotationTrait.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/public/Log/RotationTrait.php b/lib/public/Log/RotationTrait.php index d7de50410d6..9766c1228b3 100644 --- a/lib/public/Log/RotationTrait.php +++ b/lib/public/Log/RotationTrait.php @@ -58,7 +58,7 @@ trait RotationTrait { * @since 14.0.0 */ protected function shouldRotateBySize():bool { - if ((int)$this->maxSize > 0) { + if ((int)$this->maxSize > 0 && file_exists($this->filePath)) { $filesize = @filesize($this->filePath); if ($filesize >= (int)$this->maxSize) { return true; |