]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'testing' into 0.9.x
authorBrion Vibber <brion@pobox.com>
Wed, 8 Sep 2010 18:48:09 +0000 (11:48 -0700)
committerBrion Vibber <brion@pobox.com>
Wed, 8 Sep 2010 18:48:09 +0000 (11:48 -0700)
classes/Notice.php
plugins/RSSCloud/RSSCloudQueueHandler.php

index 14477b1b53a2c17122e2baafe7891c304eb678e7..f1b012465b39cbd2c0766ffe8b211802d4d964b0 100644 (file)
@@ -583,7 +583,9 @@ class Notice extends Memcached_DataObject
         if ($f2p->find()) {
             while ($f2p->fetch()) {
                 $f = File::staticGet($f2p->file_id);
-                $att[] = clone($f);
+                if ($f) {
+                    $att[] = clone($f);
+                }
             }
         }
         return $att;
index 295c261895d6152fd4f9e0051794f00317ed6d71..ef11eda2e78ae3be1fd8a09e59f19471011fae49 100644 (file)
@@ -28,7 +28,12 @@ class RSSCloudQueueHandler extends QueueHandler
 
     function handle($notice)
     {
-        $profile = $notice->getProfile();
+        try {
+            $profile = $notice->getProfile();
+        } catch (Exception $e) {
+            common_log(LOG_ERR, "Dropping RSSCloud item for notice with bogus profile: " . $e->getMessage());
+            return true;
+        }
         $notifier = new RSSCloudNotifier();
         return $notifier->notify($profile);
     }