Feedparser: Only format fatal errors
This commit is contained in:
parent
5fa36a6401
commit
d3305ff8de
|
@ -63,7 +63,15 @@ class FeedParser {
|
|||
}
|
||||
}
|
||||
|
||||
$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();
|
||||
|
|
Loading…
Reference in New Issue