From 4b9d66facafd6e795cd4953c39989bbf58486d40 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 9 Feb 2022 23:37:13 +0100 Subject: Fix thumbnail PHP type hint (#4216) * Fix thumbnail PHP type hint https://github.com/FreshRSS/FreshRSS/issues/4215 * Blank --- app/Models/Entry.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/Models/Entry.php') diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 3e0c3f37a..a190e505d 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -125,13 +125,16 @@ class FreshRSS_Entry extends Minz_Model { } } - public function thumbnail(): string { + /** + * @return array|null + */ + public function thumbnail() { foreach ($this->enclosures(true) as $enclosure) { if (!empty($enclosure['url']) && empty($enclosure['type'])) { return $enclosure; } } - return ''; + return null; } public function link(): string { -- cgit v1.2.3