]> granicus.if.org Git - php/commitdiff
Fixed bug #33277 (private method accessed by child class)
authorDmitry Stogov <dmitry@php.net>
Fri, 17 Jun 2005 10:51:10 +0000 (10:51 +0000)
committerDmitry Stogov <dmitry@php.net>
Fri, 17 Jun 2005 10:51:10 +0000 (10:51 +0000)
NEWS
Zend/zend_object_handlers.c

diff --git a/NEWS b/NEWS
index f3bacf9f6cc554e2f623e64d339a90183d3e424d..3748bbb3ba162b9f1ab04e02c9966b6568a24ce3 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ PHP                                                                        NEWS
 - Fixed memory corruption in stristr(). (Derick)
 - Fixed segfaults when CURL callback functions throw exception. (Tony)
 - Fixed bug #33340 (CLI Crash when calling php:function from XSLT). (Rob)
+- Fixed bug #33277 (private method accessed by child class). (Dmitry)
 - Fixed bug #33268 (iconv_strlen() works only with a parameter of < 3 in 
   length). (Ilia)
 - Fixed bug #33243 (ze1_compatibility_mode does not work as expected). (Dmitry)
index 5404e99c769a0411339ae9bc6dc61cdfb01a8126..9d3f09bca6b105142fd8ef958dadeeeda7f2b32a 100644 (file)
@@ -746,7 +746,8 @@ static union _zend_function *zend_std_get_method(zval *object, char *method_name
                        zend_function *priv_fbc;
 
                        if (zend_hash_find(&EG(scope)->function_table, lc_method_name, method_len+1, (void **) &priv_fbc)==SUCCESS
-                               && priv_fbc->common.fn_flags & ZEND_ACC_PRIVATE) {
+                               && priv_fbc->common.fn_flags & ZEND_ACC_PRIVATE
+                               && priv_fbc->common.scope == EG(scope)) {
                                fbc = priv_fbc;
                        }
                }