summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-01-30 02:22:17 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-01-30 02:22:17 +0000
commitb4e882d0137080dfd56d3ba72b9f03ae10f29474 (patch)
tree4262415fe4bddeb0022eea95abd4e1736acf67b9
parent41c43230da7b1aec20f0d50cb73485562ef8bde5 (diff)
downloadphp-git-b4e882d0137080dfd56d3ba72b9f03ae10f29474.tar.gz
Apply the same parse error handling to (include|require)_once as the one for
their non-once counterparts.
-rw-r--r--Zend/zend_execute.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index c41bb7b87c..3296e67647 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -3369,6 +3369,9 @@ int zend_include_or_eval_handler(ZEND_OPCODE_HANDLER_ARGS)
if (zend_hash_add(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1, (void *)&dummy, sizeof(int), NULL)==SUCCESS) {
new_op_array = zend_compile_file(&file_handle, (EX(opline)->op2.u.constant.value.lval==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
zend_destroy_file_handle(&file_handle TSRMLS_CC);
+ if (!new_op_array) {
+ zend_error(E_ERROR, "Parse error inside included file.");
+ }
} else {
zend_file_handle_dtor(&file_handle);
failure_retval=1;