From ed7c3bfe0e656c84d27fb63130da42247a3a6555 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 6 Dec 2002 17:35:52 +0000 Subject: [PATCH] Fixed bug #20865, array_key_exists() could not locate NULL keys. --- ext/standard/array.c | 5 +++++ 1 file changed, 5 insertions(+) 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"); -- 2.50.1