diff --git a/plugins/OStatus/classes/HubSub.php b/plugins/OStatus/classes/HubSub.php index c9d65c56a7..6388f8e873 100644 --- a/plugins/OStatus/classes/HubSub.php +++ b/plugins/OStatus/classes/HubSub.php @@ -228,6 +228,10 @@ class HubSub extends Managed_DataObject */ function bulkDistribute($atom, $pushCallbacks) { + if (empty($pushCallbacks)) { + common_log(LOG_ERR, 'Callback list empty for bulkDistribute.'); + return false; + } $data = array('atom' => $atom, 'topic' => $this->topic, 'pushCallbacks' => $pushCallbacks); @@ -235,6 +239,7 @@ class HubSub extends Managed_DataObject count($pushCallbacks) . " sites"); $qm = QueueManager::get(); $qm->enqueue($data, 'hubprep'); + return true; } /**