Doc #65063 [NEW]: Irrelevant return values in documentation

From: Date: Wed, 19 Jun 2013 12:49:32 +0000
Subject: Doc #65063 [NEW]: Irrelevant return values in documentation
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9954@lists.php.net to get a copy of this message
From: slyoldbear at gmail dot com Operating system: linux PHP version: 5.3.26 Package: amqp Bug Type: Documentation Problem Bug description:Irrelevant return values in documentation Description: ------------ --- From manual page: http://www.php.net/amqpqueue.setname --- 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 'AMQPQueueException' 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 var_dump($a); // 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 documentation. -- Edit bug report at https://bugs.php.net/bug.php?id=65063&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65063&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65063&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65063&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65063&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65063&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65063&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65063&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65063&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65063&r=support Expected behavior: https://bugs.php.net/fix.php?id=65063&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65063&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65063&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65063&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65063&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65063&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65063&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65063&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65063&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65063&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65063&r=mysqlcfg

« previous php.doc.bugs (#9954) next »