]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/lib/hubprepqueuehandler.php
Don't accept non-objects before testing with "instanceof".
[quix0rs-gnu-social.git] / plugins / OStatus / lib / hubprepqueuehandler.php
index 0d585938f462c8fc568c13b58a943e70b265a043..f6abfcf30dabf3e8e65d96517d036bf76bef8487 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+if (!defined('STATUSNET')) {
+    exit(1);
+}
+
 /**
  * When we have a large batch of PuSH consumers, we break the data set
  * into smaller chunks. Enqueue final destinations...
@@ -61,7 +65,7 @@ class HubPrepQueueHandler extends QueueHandler
             while (count($pushCallbacks) && $n < self::ROLLING_BATCH) {
                 $n++;
                 $callback = array_shift($pushCallbacks);
-                $sub = HubSub::staticGet($topic, $callback);
+                $sub = HubSub::getByHashkey($topic, $callback);
                 if (!$sub) {
                     common_log(LOG_ERR, "Skipping PuSH delivery for deleted(?) consumer $callback on $topic");
                     continue;