Skip to content

A free, self-hostable news aggregator…

Fix thumbnail PHP type hint (#4216)

Alexandre Alapetite4b9d66facafd
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 {