|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-12-06 11:14 UTC] grubby_d at yahoo dot com
this is an self explanatory bug. RUN THIS SCRIPT <?php $myarray = array(1, 2, 3); $myarray[NULL] = "the null value"; print_r($myarray); //output includes [] => "the null value" // can reference the null indexed value without problems //The bug is in this function: $result = array_key_exists(NULL, $myarray) //generates warning and returns FALSE; ?> I found the bug on redhat 7.3/apache.1.3.x with PHP verison 4.1.X but i reproduced the same behaviour on the submitted platform (PHP4.2.3) to comply with this bug report form. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 11:00:01 2025 UTC |
this is an self explanatory bug. RUN THIS SCRIPT <?php $myarray = array(1, 2, 3); $myarray[NULL] = "the null value"; print_r($myarray); //output includes [] => "the null value" // can reference the null indexed value without problems //The bug is in this function: if (array_key_exists(NULL, $myarray)) { echo "you won't see this output<BR>\n"; } //generates warning and returns FALSE ?> I found the bug on redhat 7.3/apache.1.3.x with PHP verison 4.1.X but i reproduced the same behaviour on the submitted platform (PHP4.2.3) to comply with this bug report form.