From 918332cf9cb9fa2d6748ce98e9cfbbefe37109d5 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 6 Mar 2025 19:18:38 +0300 Subject: [PATCH] Fix Symfony tests failures with function JIT --- ext/opcache/jit/zend_jit_ir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/opcache/jit/zend_jit_ir.c b/ext/opcache/jit/zend_jit_ir.c index b7956cda52a..4ef32415abe 100644 --- a/ext/opcache/jit/zend_jit_ir.c +++ b/ext/opcache/jit/zend_jit_ir.c @@ -9250,7 +9250,7 @@ static int zend_jit_init_static_method_call(zend_jit_ctx *jit, } ce = zend_get_known_class(op_array, opline, opline->op1_type, opline->op1); - if (!func && ce) { + if (!func && ce && (opline->op1_type == IS_CONST || !(ce->ce_flags & ZEND_ACC_TRAIT))) { zval *zv = RT_CONSTANT(opline, opline->op2); zend_string *method_name; @@ -16034,7 +16034,7 @@ static int zend_jit_fetch_static_prop(zend_jit_ctx *jit, const zend_op *opline, zend_class_entry *ce; ce = zend_get_known_class(op_array, opline, opline->op2_type, opline->op2); - if (ce) { + if (ce && (opline->op2_type == IS_CONST || !(ce->ce_flags & ZEND_ACC_TRAIT))) { zval *zv = RT_CONSTANT(opline, opline->op1); zend_string *prop_name;