php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #61533 AMQPQueue documentation shows incorrect constructor param, causes segfaults
Submitted: 2012-03-27 21:33 UTC Modified: 2012-08-26 03:39 UTC
From: stephen at betsmartmedia dot com Assigned: pdezwart (profile)
Status: Closed Package: amqp (PECL)
PHP Version: 5.3.10 OS: Arch Linux
Private report: No CVE-ID: None
 [2012-03-27 21:33 UTC] stephen at betsmartmedia dot com
Description:
------------
---
From manual page: http://www.php.net/amqpqueue.construct
---

The type annotation in the signature shows an AMQPConnection as the sole 
parameter, but the parameter should actually be an AMQPChannel, using an 
AMQPConnection instead causes a segfault.

Test script:
---------------
$conn = new AMQPConnection();
$conn->connect();
$chan = new AMQPChannel($conn);
$queue = new AMQPQueue($conn);
$queue->declare();
Segmentation fault


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-26 03:39 UTC] pdezwart@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: pdezwart
 [2012-08-26 03:39 UTC] pdezwart@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

I have fixed the code to no longer segfault, and I will update the documentation. 
Thanks for pointing this out!
 [2012-08-26 03:40 UTC] pdezwart@php.net
The fix will be deployed as part of release 1.0.5.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 09:01:28 2024 UTC