php.net |  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
Votes:9
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: KIVagant at gmail dot com
New email:
PHP Version: OS:

 

 [2012-07-13 18:20 UTC] KIVagant at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/amqpenvelope.getbody
---

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...

var_dump($envelope->getBody());
//>>>
//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;}"




Patches

Pull Requests

History

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

Duplicates #62352
Fixed in 1.0.4 release
 [2012-09-17 12:13 UTC] jpauli@php.net
-Status: Open +Status: Duplicate
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC