diff options
Diffstat (limited to 'Zend/zend_API.c')
| -rw-r--r-- | Zend/zend_API.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index cf31d6ce3d..36a7639a2d 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -2465,10 +2465,23 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca lmname = zend_str_tolower_dup(mname, mlen); if (zend_hash_find(ftable, lmname, mlen+1, (void**)&fcc->function_handler) == SUCCESS) { retval = 1; - } else if (fcc->object_pp && Z_OBJ_HT_PP(fcc->object_pp)->get_method) { - fcc->function_handler = Z_OBJ_HT_PP(fcc->object_pp)->get_method(fcc->object_pp, mname, mlen TSRMLS_CC); - retval = fcc->function_handler ? 1 : 0; - call_via_handler = 1; + if ((fcc->function_handler->op_array.fn_flags & ZEND_ACC_CHANGED) && + EG(scope) && + instanceof_function(fcc->function_handler->common.scope, EG(scope) TSRMLS_CC)) { + zend_function *priv_fbc; + + if (zend_hash_find(&EG(scope)->function_table, lmname, mlen+1, (void **) &priv_fbc)==SUCCESS + && priv_fbc->common.fn_flags & ZEND_ACC_PRIVATE + && priv_fbc->common.scope == EG(scope)) { + fcc->function_handler = priv_fbc; + } + } + } else if (fcc->object_pp) { + if (Z_OBJ_HT_PP(fcc->object_pp)->get_method) { + fcc->function_handler = Z_OBJ_HT_PP(fcc->object_pp)->get_method(fcc->object_pp, mname, mlen TSRMLS_CC); + retval = fcc->function_handler ? 1 : 0; + call_via_handler = 1; + } } else if (fcc->calling_scope) { if (fcc->calling_scope->get_static_method) { fcc->function_handler = fcc->calling_scope->get_static_method(fcc->calling_scope, mname, mlen TSRMLS_CC); |
