diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-08-11 10:23:11 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-08-11 10:23:11 -0400 |
commit | 2d29800b6f2f5e7581241dfa3e0a19fc5925049c (patch) | |
tree | 61de1af08d79716d59bfcdd1e8cf153a123d922a /lib/twitterapi.php | |
parent | 73cde378c9f8d14cb2c4a896813ac6d21299a142 (diff) | |
parent | aa9fcb91846135014eaeb2c14d4069e60b56d65f (diff) |
Merge branch 'master' into 0.8.x
Conflicts:
lib/mail.php
lib/rssaction.php
lib/twitterapi.php
Diffstat (limited to 'lib/twitterapi.php')
-rw-r--r-- | lib/twitterapi.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/twitterapi.php b/lib/twitterapi.php index a5dc2067f..583007208 100644 --- a/lib/twitterapi.php +++ b/lib/twitterapi.php @@ -188,20 +188,20 @@ class TwitterapiAction extends Action // Enclosures $attachments = $notice->attachments(); - $enclosures = array(); - foreach ($attachments as $attachment) { - if ($attachment->isEnclosure()) { - $enclosure = array(); - $enclosure['url'] = $attachment->url; - $enclosure['mimetype'] = $attachment->mimetype; - $enclosure['size'] = $attachment->size; - $enclosures[] = $enclosure; - } - } + if (!empty($attachments)) { - if (!empty($enclosures)) { - $twitter_status['attachments'] = $enclosures; + $twitter_status['attachments'] = array(); + + foreach ($attachments as $attachment) { + if ($attachment->isEnclosure()) { + $enclosure = array(); + $enclosure['url'] = $attachment->url; + $enclosure['mimetype'] = $attachment->mimetype; + $enclosure['size'] = $attachment->size; + $twitter_status['attachments'][] = $enclosure; + } + } } if ($include_user) { |