]> 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>
Sat, 16 Jan 2016 16:18:14 +0000 (17:18 +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 a46bba5cc68f289b7dd3e2e592d1ed7fd65a7002..7eba8937faf44395f4d0ba2418ad1872ea5976fe 100644 (file)
@@ -249,7 +249,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)
     {
         $data = array('atom' => $atom,
                       'topic' => $this->getTopic(),
index 6e00f49b98ac2b762979b6f5c99e965681586420..2358176ec26277efe8bc0cda7d30f5300e6e9cd4 100644 (file)
@@ -255,7 +255,7 @@ class OStatusQueueHandler extends QueueHandler
                 }
             }
         }
-        if (count($batch) >= 0) {
+        if (count($batch) > 0) {
             $sub->bulkDistribute($atom, $batch);
         }
     }