]> granicus.if.org Git - php/commitdiff
- Fixed bug #50810 (property_exists does not work for private)
authorFelipe Pena <felipe@php.net>
Sun, 7 Mar 2010 00:49:34 +0000 (00:49 +0000)
committerFelipe Pena <felipe@php.net>
Sun, 7 Mar 2010 00:49:34 +0000 (00:49 +0000)
Zend/zend_builtin_functions.c

index cb0265dc1eff533c48d004f75f453ed5e936487a..2479cdcbb3fd62390381cbfd396f2c8bf2364703 100644 (file)
@@ -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;
        }