aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Entry.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-03-03 14:27:55 +0100
committerGravatar GitHub <noreply@github.com> 2022-03-03 14:27:55 +0100
commit12000df805491c8a840c9c2134bf1d460324171a (patch)
treecc45e99273b25503fc293765fa9f12fa21c1ad3f /app/Models/Entry.php
parenta6a4e806e4137cd12e9e59fbc391aac809e477b9 (diff)
Fix XPath thumbnail bug (#4250)
#fix https://github.com/FreshRSS/FreshRSS/issues/4248
Diffstat (limited to 'app/Models/Entry.php')
-rw-r--r--app/Models/Entry.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Models/Entry.php b/app/Models/Entry.php
index 243d557ac..48db5f5c6 100644
--- a/app/Models/Entry.php
+++ b/app/Models/Entry.php
@@ -61,10 +61,10 @@ class FreshRSS_Entry extends Minz_Model {
/** @param array<string,mixed> $dao */
public static function fromArray(array $dao): FreshRSS_Entry {
- if (!isset($dao['content'])) {
+ if (empty($dao['content'])) {
$dao['content'] = '';
}
- if (isset($dao['thumbnail'])) {
+ if (!empty($dao['thumbnail'])) {
$dao['content'] .= '<p class="enclosure-content"><img src="' . $dao['thumbnail'] . '" alt="" /></p>';
}
$entry = new FreshRSS_Entry(
@@ -79,7 +79,7 @@ class FreshRSS_Entry extends Minz_Model {
$dao['is_favorite'] ?? false,
$dao['tags'] ?? ''
);
- if (isset($dao['id'])) {
+ if (!empty($dao['id'])) {
$entry->_id($dao['id']);
}
if (!empty($dao['timestamp'])) {