]> granicus.if.org Git - php/commitdiff
Fixed bug #20865, array_key_exists() could not locate NULL keys.
authorIlia Alshanetsky <iliaa@php.net>
Fri, 6 Dec 2002 17:35:52 +0000 (17:35 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 6 Dec 2002 17:35:52 +0000 (17:35 +0000)
ext/standard/array.c

index c896c7ba1de9955f28eda78a65d99c285e712ce6..c40ba3405f6f34c1ac048a6135dab0b951345cb8 100644 (file)
@@ -3507,6 +3507,11 @@ PHP_FUNCTION(array_key_exists)
                                RETURN_TRUE;
                        }
                        RETURN_FALSE;
+               case IS_NULL:
+                       if (zend_hash_exists(HASH_OF(*array), "", 1)) {
+                               RETURN_TRUE;
+                       }
+                       RETURN_FALSE;
 
                default:
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "The first argument should be either a string or an integer");