From 7c77e7431478ac67be34eec6dd10325233a2f64e Mon Sep 17 00:00:00 2001 From: dartcafe Date: Wed, 19 May 2021 13:55:29 +0200 Subject: [PATCH 1/2] 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 d7de50410d685..6c6ea955f03d5 100644 --- a/lib/public/Log/RotationTrait.php +++ b/lib/public/Log/RotationTrait.php @@ -58,7 +58,7 @@ protected function rotate():string { * @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; From 40929cba799944257e1980038afea6bd176b0c6c Mon Sep 17 00:00:00 2001 From: dartcafe Date: Wed, 19 May 2021 15:46:01 +0200 Subject: [PATCH 2/2] typo 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 6c6ea955f03d5..9766c1228b36b 100644 --- a/lib/public/Log/RotationTrait.php +++ b/lib/public/Log/RotationTrait.php @@ -58,7 +58,7 @@ protected function rotate():string { * @since 14.0.0 */ protected function shouldRotateBySize():bool { - if ((int)$this->maxSize > 0 && file_exist($this->filePath)) { + if ((int)$this->maxSize > 0 && file_exists($this->filePath)) { $filesize = @filesize($this->filePath); if ($filesize >= (int)$this->maxSize) { return true;