summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/twitterapi.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/twitterapi.php b/lib/twitterapi.php
index 4f3a5c0b6..ce188e00d 100644
--- a/lib/twitterapi.php
+++ b/lib/twitterapi.php
@@ -218,11 +218,13 @@ class TwitterapiAction extends Action
if($attachments){
$entry['enclosures']=array();
foreach($attachments as $attachment){
- $enclosure=array();
- $enclosure['url']=$attachment->url;
- $enclosure['mimetype']=$attachment->mimetype;
- $enclosure['size']=$attachment->size;
- $entry['enclosures'][]=$enclosure;
+ if (isset($attachment->filename)) {
+ $enclosure=array();
+ $enclosure['url']=$attachment->url;
+ $enclosure['mimetype']=$attachment->mimetype;
+ $enclosure['size']=$attachment->size;
+ $entry['enclosures'][]=$enclosure;
+ }
}
}