summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorToby Inkster <mail@tobyinkster.co.uk>2009-07-13 16:56:52 +0100
committerToby Inkster <mail@tobyinkster.co.uk>2009-07-13 16:56:52 +0100
commit38784141d108a96cc173167e16a1c79d9098722a (patch)
tree7a109896ee4cf0bf7eae32c2639a7b3ff0ea4b57 /classes
parentae2bc6a8500f2878ed376f60c81c3c53c8ab5b87 (diff)
Copy isset($attachment->filename) fix from RSS 1.0 to RSS 2.0 and Atom 1.0 feeds.
Diffstat (limited to 'classes')
-rw-r--r--classes/Notice.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 75044cf63..fc28f3558 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -1170,11 +1170,13 @@ class Notice extends Memcached_DataObject
$attachments = $this->attachments();
if($attachments){
foreach($attachments as $attachment){
- $attributes = array('rel'=>'enclosure','href'=>$attachment->url,'type'=>$attachment->mimetype,'length'=>$attachment->size);
- if($attachment->title){
- $attributes['title']=$attachment->title;
+ if (isset($attachment->filename)) {
+ $attributes = array('rel'=>'enclosure','href'=>$attachment->url,'type'=>$attachment->mimetype,'length'=>$attachment->size);
+ if($attachment->title){
+ $attributes['title']=$attachment->title;
+ }
+ $xs->element('link', $attributes, null);
}
- $xs->element('link', $attributes, null);
}
}