summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/feedparser.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/classes/feedparser.php b/classes/feedparser.php
index f5649d2f8..6ce69cc89 100644
--- a/classes/feedparser.php
+++ b/classes/feedparser.php
@@ -42,9 +42,11 @@ class FeedParser {
if ($error) {
foreach (libxml_get_errors() as $error) {
if ($error->level == LIBXML_ERR_FATAL) {
- if ($this->error) //currently only the first error is reported
+ // currently only the first error is reported
+ if (!isset($this->error)) {
$this->error = $this->format_error($error);
- $this->libxml_errors [] = $this->format_error($error);
+ }
+ $this->libxml_errors[] = $this->format_error($error);
}
}
}
@@ -85,7 +87,7 @@ class FeedParser {
$this->type = $this::FEED_ATOM;
break;
default:
- if (!isset($this->error) ){
+ if (!isset($this->error)) {
$this->error = "Unknown/unsupported feed type";
}
return;
@@ -184,7 +186,7 @@ class FeedParser {
if ($this->link) $this->link = trim($this->link);
} else {
- if( !isset($this->error) ){
+ if (!isset($this->error)) {
$this->error = "Unknown/unsupported feed type";
}
return;