From e6219a095de78ce03be4a36360020a6f4fe94105 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 21 Aug 2022 15:58:09 +0200 Subject: Fix sloppy comparison --- src/sp_execute.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/sp_execute.c') diff --git a/src/sp_execute.c b/src/sp_execute.c index b4e5c6c..5c0c939 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c @@ -353,14 +353,18 @@ ZEND_API zend_op_array* sp_compile_string(zval* source_string, char* filename) { // TODO(jvoisin) handle recursive calls to `eval` SPG(eval_source_string) = source_string; zend_op_array* opline = orig_zend_compile_string(source_string, filename); - sp_sloppy_modify_opcode(opline); + if (SPCFG(sloppy).enable) { + sp_sloppy_modify_opcode(opline); + } return opline; } ZEND_API zend_op_array* sp_compile_file(zend_file_handle* file_handle, int type) { zend_op_array* opline = orig_zend_compile_file(file_handle, type); - sp_sloppy_modify_opcode(opline); + if (SPCFG(sloppy).enable) { + sp_sloppy_modify_opcode(opline); + } return opline; } -- cgit v1.3