|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62558 AMQPEnvelope::getBody returns destructed serialized (or binary) data
Submitted: 2012-07-13 18:20 UTC Modified: 2012-09-17 12:13 UTC
Avg. Score:4.4 ± 0.8
Reproduced:8 of 8 (100.0%)
Same Version:7 (87.5%)
Same OS:5 (62.5%)
From: KIVagant at gmail dot com Assigned:
Status: Duplicate Package: amqp (PECL)
PHP Version: 5.3.14 OS:
Private report: No CVE-ID: None
 [2012-07-13 18:20 UTC] KIVagant at gmail dot com
From manual page:

When  I send serialized object in message for RabbitMQ, AMQPEnvelope::getBody() can't obtain it.

The json-data getBody() receives correct. But, if you send in the body of the message encoded object AMQPConnection - you can get 'segmentation fault' when decoding the message.

Test script:
class MSGTest
 protected $_message_type = 'billing.profile.change';
 protected $user_ids = null;
 public function validate() {}
$message = serialize(new MSGTest()); // or igbinary_serialize

//...sending and consuming...

//string(23) "O:7:"MSGTest":2:{s:16:""

Expected result:
string(93) "O:7:"MSGTest":2:{s:16:"*_message_type";s:22:"billing.profile.change";s:11:"*user_ids";N;}"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-17 12:13 UTC]
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at

Duplicates #62352
Fixed in 1.0.4 release
 [2012-09-17 12:13 UTC]
-Status: Open +Status: Duplicate
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Sep 22 06:23:17 2021 UTC