|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-11-10 18:07 UTC] johannes@php.net
-Status: Open
+Status: Bogus
[2011-11-10 18:07 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 16:00:01 2025 UTC |
Description: ------------ When $result parameter of mysql_fetch_row isn't resource, mysql_fetch_row returns NULL instead of FALSE. This code: while (($data = mysql_fetch_row($result)) !== false) { ... } gets in infinite loop Test script: --------------- $result = mysql_query("BAD SQL SYNTAX OR CONNECTION PROBLEM"); // $result value is now FALSE $data = mysql_fetch_row($result); var_dump($data); Expected result: ---------------- bool(false) Actual result: -------------- NULL