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);