patch by email that fixes a "PHP Fatal error: Call to a member function getEnclosure() on a non-object" error

This commit is contained in:
Hannes Mannerheim 2015-04-30 12:50:28 +02:00
parent 158ee6ec67
commit f87660d36d

View File

@ -494,6 +494,7 @@ class QvitterPlugin extends Plugin {
$attachment_url_to_id = array(); $attachment_url_to_id = array();
if (!empty($attachments)) { if (!empty($attachments)) {
foreach ($attachments as $attachment) { foreach ($attachments as $attachment) {
if(is_object($attachment)) {
try { try {
$enclosure_o = $attachment->getEnclosure(); $enclosure_o = $attachment->getEnclosure();
$thumb = $attachment->getThumbnail(); $thumb = $attachment->getThumbnail();
@ -507,6 +508,7 @@ class QvitterPlugin extends Plugin {
} }
} }
} }
}
} }
// add thumbs to $twitter_status // add thumbs to $twitter_status