|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-09-22 18:52 UTC] iliaa@php.net
[2003-09-23 04:06 UTC] MDonatas at centras dot lt
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Feb 10 14:00:01 2026 UTC |
Description: ------------ In documentation for mysql_fetch_array (); it says "Returns an array that corresponds to the fetched row, or FALSE if there are no more rows." But if connection to database fails or querie is somewhat wrong, this function will return NULL which is defenitely wrong. if you have script like while (FALSE !== ($info = mysql_fetch_array ($result))) { ... } then it will start infinite loop. Reproduce code: --------------- <? //WARNING! This will start infinite loop while (FALSE !== ($info = mysql_fetch_array ($result))) { } ?> Expected result: ---------------- Should return FALSE on any failures Actual result: -------------- Returns NULL on failures.