summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--Zend/zend_object_handlers.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index f3bacf9f6c..3748bbb3ba 100644
--- 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)
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 5404e99c76..9d3f09bca6 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -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;
}
}