X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fstompqueuemanager.php;h=7dd3e6961e005857bf5bbb729a2d4d11cf8ccf2f;hb=4fa286801e3ecbe07568a03c7b625f6749b771e8;hp=91faa8c3673011f007d53751a64b83104758e12a;hpb=47665e845ae74e6ee5b9a39565fb45dd9a93f921;p=quix0rs-gnu-social.git diff --git a/lib/stompqueuemanager.php b/lib/stompqueuemanager.php index 91faa8c367..7dd3e6961e 100644 --- a/lib/stompqueuemanager.php +++ b/lib/stompqueuemanager.php @@ -480,6 +480,13 @@ class StompQueueManager extends QueueManager { $host = $this->cons[$this->defaultIdx]->getServer(); $message = unserialize($frame->body); + + if ($message === false) { + $this->_log(LOG_ERR, "Can't unserialize frame: {$frame->body}"); + $this->_log(LOG_ERR, "Unserializable frame length: " . strlen($frame->body)); + return false; + } + $site = $message['site']; $queue = $message['handler']; @@ -578,7 +585,7 @@ class StompQueueManager extends QueueManager function incDeliveryCount($msgId) { $count = 0; - $cache = common_memcache(); + $cache = Cache::instance(); if ($cache) { $key = 'statusnet:stomp:message-retries:' . $msgId; $count = $cache->increment($key); @@ -649,7 +656,7 @@ class StompQueueManager extends QueueManager */ protected function updateSiteConfig($nickname) { - $sn = Status_network::staticGet($nickname); + $sn = Status_network::staticGet('nickname', $nickname); if ($sn) { $this->switchSite($nickname); if (!in_array($nickname, $this->sites)) {