is it ok to have NULL keys in the arrays? Best regards Andrey Hristov
----- Original Message ----- From: "Ilia Alshanetsky" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 06, 2002 7:35 PM Subject: [PHP-CVS] cvs: php4 /ext/standard array.c > iliaa Fri Dec 6 12:35:52 2002 EDT > > Modified files: > /php4/ext/standard array.c > Log: > Fixed bug #20865, array_key_exists() could not locate NULL keys. > > > Index: php4/ext/standard/array.c > diff -u php4/ext/standard/array.c:1.208 php4/ext/standard/array.c:1.209 > --- php4/ext/standard/array.c:1.208 Thu Dec 5 17:28:00 2002 > +++ php4/ext/standard/array.c Fri Dec 6 12:35:52 2002 > @@ -21,7 +21,7 @@ > +----------------------------------------------------------------------+ > */ > > -/* $Id: array.c,v 1.208 2002/12/05 22:28:00 iliaa Exp $ */ > +/* $Id: array.c,v 1.209 2002/12/06 17:35:52 iliaa Exp $ */ > > #include "php.h" > #include "php_ini.h" > @@ -3504,6 +3504,11 @@ > > case IS_LONG: > if (zend_hash_index_exists(HASH_OF(*array), Z_LVAL_PP(key))) { > + RETURN_TRUE; > + } > + RETURN_FALSE; > + case IS_NULL: > + if (zend_hash_exists(HASH_OF(*array), "", 1)) { > RETURN_TRUE; > } > RETURN_FALSE; > > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php