]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Drop RSSCloud queue items if the notice has a bogus profile, rather than attempting...
authorBrion Vibber <brion@pobox.com>
Fri, 3 Sep 2010 19:34:05 +0000 (12:34 -0700)
committerBrion Vibber <brion@pobox.com>
Fri, 3 Sep 2010 19:34:05 +0000 (12:34 -0700)
plugins/RSSCloud/RSSCloudQueueHandler.php

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);
     }