Bug #12799 Updated: mysql_fetch_array returns good data even if resource identifier is bad

From: Date: Fri, 14 Dec 2001 18:57:02 +0000
Subject: Bug #12799 Updated: mysql_fetch_array returns good data even if resource identifier is bad
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-73793@lists.php.net to get a copy of this message
ID: 12799 User updated by: drfickle@us.ibm.com Reported By: drfickle@us.ibm.com Status: Closed Bug Type: MySQL related Operating System: Mandrake Linux PHP Version: 4.0.6 New Comment: Sorry it didn't get to this in a timely fashion. I have just verified it with 4.1.0 final and it works properly. Thank you much. Previous Comments: ------------------------------------------------------------------------ [2001-12-13 06:26:38] sander@php.net No feedback. Closing. ------------------------------------------------------------------------ [2001-11-20 19:07:21] mfischer@php.net Can't reproduce with RC3, please test it too: http://www.php.net/~zeev/php-4.1.0RC3.tar.gz Feedback. ------------------------------------------------------------------------ [2001-08-16 15:35:01] drfickle@us.ibm.com 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 this bug report at http://bugs.php.net/?id=12799&edit=1

« previous php.dev (#73793) next »