forked from GNUsocial/gnu-social
check there is an array of notices to display, before doing a foreach()
This commit is contained in:
parent
2d25f288a7
commit
c3110ec8ac
@ -176,9 +176,11 @@ class Rss10Action extends Action
|
|||||||
$this->showChannel();
|
$this->showChannel();
|
||||||
$this->showImage();
|
$this->showImage();
|
||||||
|
|
||||||
|
if (count($this->notices)) {
|
||||||
foreach ($this->notices as $n) {
|
foreach ($this->notices as $n) {
|
||||||
$this->showItem($n);
|
$this->showItem($n);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->showCreators();
|
$this->showCreators();
|
||||||
$this->endRss();
|
$this->endRss();
|
||||||
@ -203,9 +205,11 @@ class Rss10Action extends Action
|
|||||||
$this->elementStart('items');
|
$this->elementStart('items');
|
||||||
$this->elementStart('rdf:Seq');
|
$this->elementStart('rdf:Seq');
|
||||||
|
|
||||||
|
if (count($this->notices)) {
|
||||||
foreach ($this->notices as $notice) {
|
foreach ($this->notices as $notice) {
|
||||||
$this->element('rdf:li', array('rdf:resource' => $notice->uri));
|
$this->element('rdf:li', array('rdf:resource' => $notice->uri));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->elementEnd('rdf:Seq');
|
$this->elementEnd('rdf:Seq');
|
||||||
$this->elementEnd('items');
|
$this->elementEnd('items');
|
||||||
|
Loading…
Reference in New Issue
Block a user