diff options
| author | 2022-02-09 23:37:13 +0100 | |
|---|---|---|
| committer | 2022-02-09 23:37:13 +0100 | |
| commit | 4b9d66facafd6e795cd4953c39989bbf58486d40 (patch) | |
| tree | a0284cca4ada348fc917857eb545118a6f131c53 /app/Models/Entry.php | |
| parent | 133e0d61db4d316806686243e735961166113e1c (diff) | |
Fix thumbnail PHP type hint (#4216)
* Fix thumbnail PHP type hint
https://github.com/FreshRSS/FreshRSS/issues/4215
* Blank
Diffstat (limited to 'app/Models/Entry.php')
| -rw-r--r-- | app/Models/Entry.php | 7 |
1 files changed, 5 insertions, 2 deletions
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<string,string>|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 { |
