|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65063 Irrelevant return values in documentation
Submitted: 2013-06-19 12:49 UTC Modified: 2014-12-27 22:14 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: slyoldbear at gmail dot com Assigned: pdezwart (profile)
Status: Closed Package: amqp (PECL)
PHP Version: 5.3.26 OS: linux
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.
Block user comment
Status: Assign to:
Bug Type:
From: slyoldbear at gmail dot com
New email:
PHP Version: OS:


 [2013-06-19 12:49 UTC] slyoldbear at gmail dot com
From manual page:

In the AMQPQueue::setName() page, it's said the return value is:
Returns TRUE on success or FALSE on failure.

however when I set a valid queue name, the return is NULL, and when I set an 
invalid one, I've got an: PHP Fatal error:  Uncaught exception 
with message 'Invalid queue name given, must be between 1 and 255 characters long.

Test script:
// ... here is all stuff regarding the AMQP Connection and Channel
$q = new AMQPQueue($chan);

// example #1 - 3 chars queue name
$a = $q->setName('foo');

// prints NULL

// example #2 - 258 chars queue name
$a = $q->setName('foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo');

// Exception thrown
// PHP Fatal error:  Uncaught exception 'AMQPQueueException' with message 'Invalid queue name given, must be between 1 and 255 characters long.

Expected result:
TRUE in the first example and FALSE in the second one, as mentionned in the 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-24 22:55 UTC]
-Status: Open +Status: Analyzed -Assigned To: +Assigned To: pdezwart
 [2013-06-24 22:55 UTC]
The docs should mention NULL is returned if string $queue_name length is less than 
1 or greater than 255 because the check is explicit, see:

As for exceptions, those should also be documented. This might offer a clue:

Assigning to Pieter de Zwart (pdezwart) as he is the expert.
 [2014-12-27 22:14 UTC]
-Status: Analyzed +Status: Closed
 [2014-12-27 22:14 UTC]
AMQP documentation is no longer a part of manual.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Oct 16 01:03:34 2021 UTC