From: Mikael Nordfeldth Date: Sat, 16 Jan 2016 16:34:27 +0000 (+0100) Subject: bulkDistribute won't add empty lists to database X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=912d65c767cff33f3903068d57f7165a4d2ba6f0;p=quix0rs-gnu-social.git bulkDistribute won't add empty lists to database --- 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; } /**