summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rssaction.php2
-rw-r--r--lib/twitterapi.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/rssaction.php b/lib/rssaction.php
index 183c09f47..ffa1f9e99 100644
--- a/lib/rssaction.php
+++ b/lib/rssaction.php
@@ -237,7 +237,7 @@ class Rss10Action extends Action
$attachments = $notice->attachments();
if($attachments){
foreach($attachments as $attachment){
- if (isset($attachment->filename)) {
+ if ($attachment->isEnclosure()) {
// DO NOT move xmlns declaration to root element. Making it
// the default namespace here improves compatibility with
// real-world feed readers.
diff --git a/lib/twitterapi.php b/lib/twitterapi.php
index ce188e00d..655b6c777 100644
--- a/lib/twitterapi.php
+++ b/lib/twitterapi.php
@@ -218,7 +218,7 @@ class TwitterapiAction extends Action
if($attachments){
$entry['enclosures']=array();
foreach($attachments as $attachment){
- if (isset($attachment->filename)) {
+ if ($attachment->isEnclosure()) {
$enclosure=array();
$enclosure['url']=$attachment->url;
$enclosure['mimetype']=$attachment->mimetype;