From: Felipe Pena <felipe@php.net> Date: Sun, 7 Mar 2010 00:49:34 +0000 (+0000) Subject: - Fixed bug #50810 (property_exists does not work for private) X-Git-Tag: php-5.4.0alpha1~191^2~1895 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dffc5b7728d9102346284be4873a6eb9cf253a62;p=php - Fixed bug #50810 (property_exists does not work for private) --- diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index cb0265dc1e..2479cdcbb3 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1155,10 +1155,8 @@ ZEND_FUNCTION(property_exists) } h = zend_u_get_hash_value(property_type, property, property_len+1); - if (zend_u_hash_quick_find(&ce->properties_info, property_type, property, property_len+1, h, (void **) &property_info) == SUCCESS) { - if (property_info->flags & ZEND_ACC_SHADOW) { - RETURN_FALSE; - } + if (zend_u_hash_quick_find(&ce->properties_info, property_type, property, property_len+1, h, (void **) &property_info) == SUCCESS + && (property_info->flags & ZEND_ACC_SHADOW) == 0) { RETURN_TRUE; }