summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/utils.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/utils.php b/lib/utils.php
index cc3b6aa09..ce7712e9a 100644
--- a/lib/utils.php
+++ b/lib/utils.php
@@ -30,6 +30,8 @@ class OC_News_Utils {
return null;
}
+ //I understand this try-catch sucks, but SimplePie gives weird errors sometimes
+ try {
$spfeed->handle_content_type();
$title = $spfeed->get_title();
@@ -57,7 +59,10 @@ class OC_News_Utils {
$feed->setFavicon($webFavicon);
}
return $feed;
-
+ }
+ catch (Exception $e) {
+ return null;
+ }
}
public static function checkFavicon($favicon) {