From ef7166481700b670156f9ea80b84a53200ebc698 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 8 Aug 2007 13:32:46 +0000 Subject: Fixed bug #42211 (property_exists() fails to find protected properties from a parent class) --- Zend/zend_builtin_functions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Zend/zend_builtin_functions.c') diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 0f4cf86b20..7b036edfff 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -979,7 +979,8 @@ ZEND_FUNCTION(property_exists) } zend_unmangle_property_name(property_info->name, property_info->name_length, &class_name, &prop_name); if (!strncmp(class_name, "*", 1)) { - if (instanceof_function(EG(scope), ce TSRMLS_CC)) { + if (instanceof_function(EG(scope), ce TSRMLS_CC) || + (EG(This) && instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC))) { RETURN_TRUE; } RETURN_FALSE; -- cgit v1.2.1