From: Ilia Alshanetsky Date: Fri, 30 Jan 2004 02:22:17 +0000 (+0000) Subject: Apply the same parse error handling to (include|require)_once as the one for X-Git-Tag: php-5.0.0b4RC1~226 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4e882d0137080dfd56d3ba72b9f03ae10f29474;p=php Apply the same parse error handling to (include|require)_once as the one for their non-once counterparts. --- 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;