Bug #12799: mysql_fetch_array returns good data even if resource identifier is bad
| From: | drfickle at us dot ibm dot com | Date: | Thu, 16 Aug 2001 19:35:01 +0000 |
| Subject: | Bug #12799: mysql_fetch_array returns good data even if resource identifier is bad | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-63466@lists.php.net to get a copy of this message | ||
From: drfickle@us.ibm.com
Operating system: Mandrake Linux
PHP version: 4.0.6
PHP Bug Type: MySQL related
Bug description: mysql_fetch_array returns good data even if resource identifier is bad
When calling mysql_fetch_array($foo) and $foo is not a valid resource
identifier (not even a defined variable), the function call will return
data from the last successful query instead erroring.
This makes it very difficult to debug your code because you may return data
from a different query. Instead the function should return nothing so that
you know to look at your function call arguments.
--
Edit bug report at: http://bugs.php.net/?id=12799&edit=1