Abort on parse error in an include file (patch by Ilia)

This commit is contained in:
Zeev Suraski 2004-02-03 14:32:02 +00:00
parent e1bf9cc4c2
commit 60bb89c505
2 changed files with 1 additions and 5 deletions

View File

@ -3365,9 +3365,6 @@ 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, (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;

View File

@ -368,8 +368,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR
zend_do_handle_exception(TSRMLS_C);
CG(in_compilation) = original_in_compilation;
if (compiler_result==1) { /* parser error */
CG(unclean_shutdown) = 1;
retval = NULL;
zend_bailout();
}
compilation_successful=1;