From: Ilia Alshanetsky Date: Fri, 6 Dec 2002 17:35:52 +0000 (+0000) Subject: Fixed bug #20865, array_key_exists() could not locate NULL keys. X-Git-Tag: RELEASE_1_0b3~139 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed7c3bfe0e656c84d27fb63130da42247a3a6555;p=php Fixed bug #20865, array_key_exists() could not locate NULL keys. --- diff --git a/ext/standard/array.c b/ext/standard/array.c index c896c7ba1d..c40ba3405f 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -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");