summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rssaction.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/rssaction.php b/lib/rssaction.php
index 3b303f73e..d591c99ed 100644
--- a/lib/rssaction.php
+++ b/lib/rssaction.php
@@ -176,8 +176,10 @@ class Rss10Action extends Action
$this->showChannel();
$this->showImage();
- foreach ($this->notices as $n) {
- $this->showItem($n);
+ if (count($this->notices)) {
+ foreach ($this->notices as $n) {
+ $this->showItem($n);
+ }
}
$this->showCreators();
@@ -203,8 +205,10 @@ class Rss10Action extends Action
$this->elementStart('items');
$this->elementStart('rdf:Seq');
- foreach ($this->notices as $notice) {
- $this->element('rdf:li', array('rdf:resource' => $notice->uri));
+ if (count($this->notices)) {
+ foreach ($this->notices as $notice) {
+ $this->element('rdf:li', array('rdf:resource' => $notice->uri));
+ }
}
$this->elementEnd('rdf:Seq');