diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 0669d106f15..379a97733d0 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -8361,10 +8361,10 @@ static zend_op_array *zend_compile_func_decl_ex( "nodiscard", sizeof("nodiscard")-1 ); - + if (nodiscard_attribute) { op_array->fn_flags |= ZEND_ACC_NODISCARD; - } + } } /* Do not leak the class scope into free standing functions, even if they are dynamically