forked from GNUsocial/gnu-social
Only populate attachments array element if there are attachments
This commit is contained in:
parent
348fa35c6b
commit
9ec022df93
@ -188,8 +188,11 @@ class TwitterapiAction extends Action
|
||||
|
||||
# Enclosures
|
||||
$attachments = $notice->attachments();
|
||||
|
||||
if (!empty($attachments)) {
|
||||
|
||||
$twitter_status['attachments'] = array();
|
||||
if($attachments){
|
||||
|
||||
foreach ($attachments as $attachment) {
|
||||
if ($attachment->isEnclosure()) {
|
||||
$enclosure = array();
|
||||
|
Loading…
Reference in New Issue
Block a user