summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-07-13 14:32:56 -0400
committerCraig Andrews <candrews@integralblue.com>2009-07-13 14:32:56 -0400
commit678f054bfe51e74e26a992ae7de84b73ea95baee (patch)
treebf1ff296d3d36e2d34e25eeee92f5f0094e3ad24 /classes/Notice.php
parent858e3e765f995729542821b04c07876f0d360245 (diff)
parent38784141d108a96cc173167e16a1c79d9098722a (diff)
Merge commit 'tobyinks/master' into 0.8.x
Diffstat (limited to 'classes/Notice.php')
-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);
}
}