summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend-scanner.l3
-rw-r--r--Zend/zend_execute.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/Zend/zend-scanner.l b/Zend/zend-scanner.l
index 86566de35b..90f8d0eff4 100644
--- a/Zend/zend-scanner.l
+++ b/Zend/zend-scanner.l
@@ -389,9 +389,6 @@ ZEND_API zend_op_array *v_compile_files(int mark_as_ref CLS_DC, int file_count,
if (compiled_files>0) {
CG(active_op_array) = original_active_op_array;
pass_two(op_array);
- if (mark_as_ref) {
- pass_include_eval(op_array);
- }
} else {
CG(active_op_array) = original_active_op_array;
destroy_op_array(op_array);
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 7bf0e106c8..8af12376ea 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -2053,6 +2053,9 @@ send_by_ref:
if (file_handle.handle.fp) {
if (!opened_path || zend_hash_add(&EG(included_files), opened_path, strlen(opened_path)+1, (void *)&dummy, sizeof(int), NULL)==SUCCESS) {
new_op_array = compile_files(1 CLS_CC, 1, &file_handle);
+ if (new_op_array) {
+ pass_include_eval(new_op_array);
+ }
}
if (opened_path) {
free(opened_path);
@@ -2067,6 +2070,9 @@ send_by_ref:
case ZEND_INCLUDE:
case ZEND_REQUIRE:
new_op_array = compile_filename(opline->op2.u.constant.value.lval, get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R) CLS_CC ELS_CC);
+ if (new_op_array) {
+ pass_include_eval(new_op_array);
+ }
break;
case ZEND_EVAL:
new_op_array = compile_string(get_zval_ptr(&opline->op1, Ts, &EG(free_op1), BP_VAR_R) CLS_CC);