diff options
-rw-r--r-- | classes/feedparser.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/classes/feedparser.php b/classes/feedparser.php index 22052bdb6..07de73a9d 100644 --- a/classes/feedparser.php +++ b/classes/feedparser.php @@ -62,8 +62,16 @@ class FeedParser { } } } - - $this->error = $this->format_error($error); + + $this->error = ""; + if($error) { + foreach(libxml_get_errors() as $error) { + if($error->level == LIBXML_ERR_FATAL) { + $this->error = $this->format_error($error); + break; //break here because currently we only show one error + } + } + } libxml_clear_errors(); $this->items = array(); |