From a2108c784f386fab57e864f5fa66eaecc4e22793 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Mon, 13 Mar 2017 22:11:20 +0100 Subject: [PATCH] [FeedExpander] Properly cast simplexml elements This fixes a possible cause of "Serialization of 'SimpleXMLElement' is not allowed" reported via #487 --- lib/FeedExpander.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/FeedExpander.php b/lib/FeedExpander.php index 87545c9..1d0612d 100644 --- a/lib/FeedExpander.php +++ b/lib/FeedExpander.php @@ -82,12 +82,12 @@ abstract class FeedExpander extends BridgeAbstract { // TODO set title, link, description, language, and so on protected function load_RSS_2_0_feed_data($rssContent){ - $this->name = trim($rssContent->title); - $this->uri = trim($rssContent->link); + $this->name = trim((string)$rssContent->title); + $this->uri = trim((string)$rssContent->link); } protected function load_ATOM_feed_data($content){ - $this->name = $content->title; + $this->name = (string)$content->title; // Find best link (only one, or first of 'alternate') if(!isset($content->link)){