]> 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)
NEWS
Zend/zend_builtin_functions.c

diff --git a/NEWS b/NEWS
index a61e55218e8f72a98ebe8daacd535246fae0876d..103d5d92770dd928bf3e23397f96c13b980b9ec4 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,7 @@ PHP                                                                        NEWS
 - Fixed bug #51023 (filter doesn't detect int overflows with GCC 4.4).
   (Raphael Geissert)
 - Fixed bug #50999 (unaligned memory access in dba_fetch()). (Felipe)
+- Fixed bug #50810 (property_exists does not work for private). (Felipe)
 - Fixed bug #50731 (Inconsistent namespaces sent to functions registered with
   spl_autoload_register). (Felipe)
 - Fixed bug #50358 (Compile failure compiling ext/phar/util.lo). (Felipe)
index a001c6c7e509e202529204550274524cb683d387..4c96e199751479ad06c7f65312913fb21d95fe0c 100644 (file)
@@ -1151,10 +1151,8 @@ ZEND_FUNCTION(property_exists)
        }
 
        h = zend_get_hash_value(property, property_len+1);
-       if (zend_hash_quick_find(&ce->properties_info, property, property_len+1, h, (void **) &property_info) == SUCCESS) {
-               if (property_info->flags & ZEND_ACC_SHADOW) {
-                       RETURN_FALSE;
-               }
+       if (zend_hash_quick_find(&ce->properties_info, property, property_len+1, h, (void **) &property_info) == SUCCESS
+               && (property_info->flags & ZEND_ACC_SHADOW) == 0) {
                RETURN_TRUE;
        }