]> granicus.if.org Git - php/commitdiff
fix array_key_exists() with NULL key in Unicode mode
authorAntony Dovgal <tony2001@php.net>
Wed, 15 Nov 2006 22:43:19 +0000 (22:43 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 15 Nov 2006 22:43:19 +0000 (22:43 +0000)
ext/standard/array.c

index e66cfa48465ec804e9706f14615e2c07001185d5..1694b481f85e5c538c7630f476da6d05df41481b 100644 (file)
@@ -4335,7 +4335,7 @@ PHP_FUNCTION(array_key_exists)
                        }
                        RETURN_FALSE;
                case IS_NULL:
-                       if (zend_hash_exists(HASH_OF(array), "", 1)) {
+                       if (zend_u_hash_exists(HASH_OF(array), (UG(unicode) ? IS_UNICODE : IS_STRING), EMPTY_ZSTR, 1)) {
                                RETURN_TRUE;
                        }
                        RETURN_FALSE;