X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=classes%2FNotice.php;h=e569d8305a3175d637513543b450d1936bbbdf95;hb=a08c76a4342cfb4b3d772f6880ba0b8f3153b246;hp=ed41acbaea08d2852d2c0158e56de53674a82fe2;hpb=522008dee570aafcc844bf123d25203c7d9c3ebc;p=quix0rs-gnu-social.git diff --git a/classes/Notice.php b/classes/Notice.php index ed41acbaea..e569d8305a 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1199,10 +1199,11 @@ class Notice extends Memcached_DataObject $attachments = $this->attachments(); if($attachments){ foreach($attachments as $attachment){ - if ($attachment->isEnclosure()) { - $attributes = array('rel'=>'enclosure','href'=>$attachment->url,'type'=>$attachment->mimetype,'length'=>$attachment->size); - if($attachment->title){ - $attributes['title']=$attachment->title; + $enclosure=$attachment->getEnclosure(); + if ($enclosure) { + $attributes = array('rel'=>'enclosure','href'=>$enclosure->url,'type'=>$enclosure->mimetype,'length'=>$enclosure->size); + if($enclosure->title){ + $attributes['title']=$enclosure->title; } $xs->element('link', $attributes, null); }