Skip to content

Commit 61f893d

Browse files
committed
Add missing COMPILE_IGNORE_OTHER_FILES check for static calls
1 parent c3acfb1 commit 61f893d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Zend/zend_compile.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4709,7 +4709,13 @@ static void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type
47094709
if (opline->op1_type == IS_CONST) {
47104710
zend_string *lcname = Z_STR_P(CT_CONSTANT(opline->op1) + 1);
47114711
ce = zend_hash_find_ptr(CG(class_table), lcname);
4712-
if (!ce && CG(active_class_entry)
4712+
if (ce) {
4713+
if (ZEND_USER_CODE(ce->type)
4714+
&& (CG(compiler_options) & ZEND_COMPILE_IGNORE_OTHER_FILES)
4715+
&& (ce->info.user.filename != CG(active_op_array)->filename)) {
4716+
ce = NULL;
4717+
}
4718+
} else if (CG(active_class_entry)
47134719
&& zend_string_equals_ci(CG(active_class_entry)->name, lcname)) {
47144720
ce = CG(active_class_entry);
47154721
}

0 commit comments

Comments
 (0)