#38127 [Opn->WFx]: Return value on error is incorrect
| From: | nlopess@php.net | Date: | Tue, 18 Jul 2006 09:47:31 +0000 |
| Subject: | #38127 [Opn->WFx]: Return value on error is incorrect | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969373510@lists.php.net to get a copy of this message | ||
ID: 38127
Updated by: nlopess@php.net
Reported By: btherl at yahoo dot com dot au
-Status: Open
+Status: Wont fix
Bug Type: Documentation problem
Operating System: Linux
PHP Version: Irrelevant
New Comment:
most functions return NULL on bogus parameters..
No need to waste time with this.
Previous Comments:
------------------------------------------------------------------------
[2006-07-18 01:51:23] btherl at yahoo dot com dot au
Description:
------------
pg_fetch_all() documentation says:
"FALSE is returned if there are no rows in the result, or on any other
error."
But NULL is returned if the argument is not a resource.
Reproduce code:
---------------
<?php
$a = pg_fetch_all('hello');
var_dump($a);
?>
Expected result:
----------------
Warning: pg_fetch_all() expects parameter 1 to be resource, string
given in /tmp/t.php on line 2
bool(false)
Actual result:
--------------
Warning: pg_fetch_all() expects parameter 1 to be resource, string
given in /tmp/t.php on line 2
NULL
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38127&edit=1