From 6e499ef0b23f881bfd439453834e74d60cab0096 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Wed, 19 May 2021 13:55:29 +0200 Subject: [PATCH] fix #25813 Signed-off-by: dartcafe --- lib/public/Log/RotationTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/public/Log/RotationTrait.php b/lib/public/Log/RotationTrait.php index d7de50410d..6c6ea955f0 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_exist($this->filePath)) { $filesize = @filesize($this->filePath); if ($filesize >= (int)$this->maxSize) { return true;