From: Zeev Suraski Date: Tue, 3 Feb 2004 14:32:02 +0000 (+0000) Subject: Abort on parse error in an include file (patch by Ilia) X-Git-Tag: php-5.0.0b4RC1~172 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60bb89c5057df8a9d4c4972064195cd2950c5040;p=php Abort on parse error in an include file (patch by Ilia) --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index a6e645ff55..4deb464d25 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -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; diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index eff969e499..fe6b17d9f9 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -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;