From afad1d11af812538fe01d274ac3b9311e033e5a6 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 5 Jun 2018 13:48:34 +0200 Subject: Fix type exception in loadCompleteContent (#1918) * Fix type exception in loadCompleteContent https://github.com/FreshRSS/FreshRSS/issues/1917 With some refactoring * Changelog 1917 https://github.com/FreshRSS/FreshRSS/issues/1917 https://github.com/FreshRSS/FreshRSS/pull/1918 --- app/Models/Feed.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/Models/Feed.php') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 7eb079f15..c8ccff09b 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -391,8 +391,11 @@ class FreshRSS_Feed extends Minz_Model { $date ? $date : time() ); $entry->_tags($tags); - // permet de récupérer le contenu des flux tronqués - $entry->loadCompleteContent($this->pathEntries()); + $entry->_feed($this); + if ($this->pathEntries != '') { + // Optionally load full content for truncated feeds + $entry->loadCompleteContent(); + } $entries[] = $entry; unset($item); -- cgit v1.2.3