ID: 20865 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Unknown/Other Function Operating System: XP/IIS PHP Version: 4.2.3 New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [2002-12-06 11:14:21] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20865&edit=1