php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #53645 Wrong return type for AMQPQueue::consume
Submitted: 2011-01-03 23:06 UTC Modified: 2011-02-10 16:09 UTC
From: ruedu at dustinrue dot com Assigned: pdezwart (profile)
Status: Closed Package: Unknown/Other Function
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ruedu at dustinrue dot com
New email:
PHP Version: OS:

 

 [2011-01-03 23:06 UTC] ruedu at dustinrue dot com
Description:
------------
---
From manual page: http://www.php.net/amqpqueue.consume
---
Documentation for AMQPQueue::consume claims you'll get an array returned but the function declaration suggests the method returns nothing.  Using the method in a script seems to support that the method returns nothing. 

Expected result:
----------------
Documentation needs to be updated as well as the example on the page.  


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-04 14:03 UTC] aharvey@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: pdezwart
 [2011-01-04 14:03 UTC] aharvey@php.net
Looks like it returns an array sometimes. Pieter, can you clarify under
what circumstances consume() returns an array and when it doesn't?
 [2011-01-04 19:56 UTC] pdezwart@php.net
-Status: Assigned +Status: Feedback
 [2011-01-04 19:56 UTC] pdezwart@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Using the basic example I was able to dump out messages from the given queue. Can you please provide more information:
- version of RabbitMQ broker
- version of rabbit-c client
- version of PHP
- Script + output

Thanks.
 [2011-01-04 20:13 UTC] ruedu at dustinrue dot com
-Status: Feedback +Status: Assigned
 [2011-01-04 20:13 UTC] ruedu at dustinrue dot com
RabbitMQ version: 2.2.0
RabbitMQ-c version: Fri, 17 Dec 2010 13:37:18 -0500
PHP version: PHP 5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010 13:49:46) 

I used the basic example provided on the page with an existing queue.  The queue count is reduced each time I run the script but there is no output.  I realize now that my PHP version is a bit older but regardless of the PHP version, the documentation conflicts itself.  In one place it claims the function returns nothing, later on it says an array is returned.  I'll try compiling PHP from source to see if it fixes the issue I'm seeing.

Thanks
 [2011-02-10 16:08 UTC] vrana@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=308199
Log: Fix proto (doc bug #53645)
 [2011-02-10 16:09 UTC] vrana@php.net
-Summary: Documentation is unclear or wrong +Summary: Wrong return type for AMQPQueue::consume -Status: Assigned +Status: Closed
 [2011-02-10 16:09 UTC] vrana@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/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 19:01:29 2024 UTC