diff options
author | Toby Inkster <mail@tobyinkster.co.uk> | 2009-07-13 16:56:52 +0100 |
---|---|---|
committer | Toby Inkster <mail@tobyinkster.co.uk> | 2009-07-13 16:56:52 +0100 |
commit | 38784141d108a96cc173167e16a1c79d9098722a (patch) | |
tree | 7a109896ee4cf0bf7eae32c2639a7b3ff0ea4b57 /lib | |
parent | ae2bc6a8500f2878ed376f60c81c3c53c8ab5b87 (diff) |
Copy isset($attachment->filename) fix from RSS 1.0 to RSS 2.0 and Atom 1.0 feeds.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/twitterapi.php | 12 |
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; + } } } |