summaryrefslogtreecommitdiff
path: root/ext/standard/array.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2002-12-06 17:35:52 +0000
committerIlia Alshanetsky <iliaa@php.net>2002-12-06 17:35:52 +0000
commited7c3bfe0e656c84d27fb63130da42247a3a6555 (patch)
tree8476ff552c513ba0055e2ad4e919dfc6b335aea1 /ext/standard/array.c
parente062dffe6c81751133121519a9ae3cbe854a509a (diff)
downloadphp-git-ed7c3bfe0e656c84d27fb63130da42247a3a6555.tar.gz
Fixed bug #20865, array_key_exists() could not locate NULL keys.
Diffstat (limited to 'ext/standard/array.c')
-rw-r--r--ext/standard/array.c5
1 files changed, 5 insertions, 0 deletions
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");