From d917bf084c9db42123a5e43436c9370f19d6c69c Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Fri, 6 Oct 2006 17:35:32 +0000 Subject: MFH: fix #39067 (getDeclaringClass() and private properties) --- ext/reflection/php_reflection.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ext/reflection/php_reflection.c') diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index a733a6a2f3..280f635188 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -4029,6 +4029,10 @@ ZEND_METHOD(reflection_property, getDeclaringClass) while (tmp_ce && zend_hash_find(&tmp_ce->properties_info, prop_name, prop_name_len + 1, (void **) &tmp_info) == SUCCESS) { ce = tmp_ce; tmp_ce = tmp_ce->parent; + if (tmp_info->flags & ZEND_ACC_PRIVATE) { + /* it's a private property, so it can't be inherited */ + break; + } } zend_reflection_class_factory(ce, return_value TSRMLS_CC); -- cgit v1.2.1