From ea1447c3ce5f6f6895143aa93e2b0c7dfa3e5618 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sun, 7 Mar 2010 00:49:34 +0000 Subject: [PATCH] - Fixed bug #50810 (property_exists does not work for private) --- NEWS | 1 + Zend/zend_builtin_functions.c | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index a61e55218e..103d5d9277 100644 --- 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) diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index a001c6c7e5..4c96e19975 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -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; } -- 2.40.0