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
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: stephen at betsmartmedia dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 17:01:34 2025 UTC