]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
In very specific circumstances we can bulkDistribute 0 notices
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 16 Jan 2016 16:18:14 +0000 (17:18 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 20 Jan 2016 14:32:29 +0000 (15:32 +0100)
Seems to be what caused an infinite loop on quitter.es, or I guess so anyway.

plugins/OStatus/classes/HubSub.php
plugins/OStatus/lib/ostatusqueuehandler.php

index 6388f8e87335fe98139096cc0491383b162d1384..7ffda88e748c596496177e7f26c684ba03e96e36 100644 (file)
@@ -226,7 +226,7 @@ class HubSub extends Managed_DataObject
      * @param string $atom well-formed Atom feed
      * @param array $pushCallbacks list of callback URLs
      */
-    function bulkDistribute($atom, $pushCallbacks)
+    function bulkDistribute($atom, array $pushCallbacks)
     {
         if (empty($pushCallbacks)) {
             common_log(LOG_ERR, 'Callback list empty for bulkDistribute.');
index 0376d13e52bb623ad2f8ec53aedcb86581db3a20..fed93b6ea62b69200c7c0303ae92ec02cc4758d9 100644 (file)
@@ -257,7 +257,7 @@ class OStatusQueueHandler extends QueueHandler
                 }
             }
         }
-        if (count($batch) >= 0) {
+        if (count($batch) > 0) {
             $sub->bulkDistribute($atom, $batch);
         }
     }