1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 10:12:18 +01:00

Apply the same parse error handling to (include|require)_once as the one for

their non-once counterparts.
This commit is contained in:
Ilia Alshanetsky
2004-01-30 02:22:17 +00:00
parent 41c43230da
commit b4e882d013

View File

@@ -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;