From 3177d6a4dcc7784351e0963aeadc361051f6f1c6 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 5 Dec 2020 20:11:04 +0100 Subject: [PATCH] fix phpstan --- Models/Collection.php | 4 +++- Models/UploadFile.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Models/Collection.php b/Models/Collection.php index c8cf8df..4cabbe4 100755 --- a/Models/Collection.php +++ b/Models/Collection.php @@ -115,7 +115,9 @@ class Collection extends Media implements \Iterator */ public function current() : Media { - return \current($this->sources); + $current = \current($this->sources); + + return $current === false ? $this : $current ; } /** diff --git a/Models/UploadFile.php b/Models/UploadFile.php index 0bdc79b..d6d932a 100755 --- a/Models/UploadFile.php +++ b/Models/UploadFile.php @@ -290,7 +290,7 @@ class UploadFile return; } - \imageinterlace($img, $this->isInterlaced ? 1 : 0); + \imageinterlace($img, $this->isInterlaced); if ($extension === 'png') { \imagepng($img, $path);