]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
capture some info if serialization fails on stomp frame
authorEvan Prodromou <evan@status.net>
Mon, 18 Apr 2011 21:55:38 +0000 (17:55 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 18 Apr 2011 21:55:38 +0000 (17:55 -0400)
lib/stompqueuemanager.php

index 1d9a5ad207ef4846aa7e8caf05d08dc9054fd1d1..45a82e240acab6f35756e4544d298ee77db86464 100644 (file)
@@ -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->stats('baditem', $queue);
+            return false;
+        }
+
         $site = $message['site'];
         $queue = $message['handler'];