[FeedExpander] Properly cast simplexml elements

This fixes a possible cause of
"Serialization of 'SimpleXMLElement' is not allowed"
reported via #487
This commit is contained in:
logmanoriginal 2017-03-13 22:11:20 +01:00
parent c803396d7e
commit a2108c784f

View file

@ -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)){