Don't accept non-objects before testing with "instanceof".
[quix0rs-gnu-social.git] / plugins / OStatus / lib / huboutqueuehandler.php
index 67a9d9e36b8aee0d167d79efe5c8e9864c219fb8..46d9e08e3924922b4b9da6499f24d79c529e47d2 100644 (file)
@@ -39,6 +39,7 @@ class HubOutQueueHandler extends QueueHandler
         $atom = $data['atom'];
         $retries = $data['retries'];
 
+        assert(is_object($sub));
         assert($sub instanceof HubSub);
         assert(is_string($atom));
 
@@ -49,7 +50,7 @@ class HubOutQueueHandler extends QueueHandler
             $msg = "Failed PuSH to $sub->callback for $sub->topic: " .
                    $e->getMessage();
             if ($retries > 0) {
-                common_log(LOG_ERR, "$msg; scheduling for $retries more tries");
+                common_log(LOG_INFO, "$msg; scheduling for $retries more tries");
 
                 // @fixme when we have infrastructure to schedule a retry
                 // after a delay, use it.