mirror of
https://github.com/php/php-src.git
synced 2026-04-01 21:22:13 +02:00
Respect static method visibility
This commit is contained in:
@@ -984,7 +984,14 @@ zend_function *zend_optimizer_get_called_func(
|
||||
script, op_array, opline, rt_constants);
|
||||
if (ce) {
|
||||
zend_string *func_name = Z_STR_P(GET_OP(op2) + 1);
|
||||
return zend_hash_find_ptr(&ce->function_table, func_name);
|
||||
zend_function *fbc = zend_hash_find_ptr(&ce->function_table, func_name);
|
||||
if (fbc) {
|
||||
zend_bool is_public = (fbc->common.fn_flags & ZEND_ACC_PUBLIC) != 0;
|
||||
zend_bool same_scope = fbc->common.scope == op_array->scope;
|
||||
if (is_public|| same_scope) {
|
||||
return fbc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user