From: Zeev Suraski Date: Sat, 17 Aug 2002 16:22:40 +0000 (+0000) Subject: MFZE1 X-Git-Tag: RELEASE_0_91~413 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b66561c44a1e0684cfca09088dc28cbe9fd999b9;p=php MFZE1 --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index d397ccf387..5bdbaa230e 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2673,7 +2673,11 @@ send_by_ref: file_handle.free_filename = 0; if (file_handle.handle.fp) { - if (!opened_path || zend_hash_add(&EG(included_files), opened_path, strlen(opened_path)+1, (void *)&dummy, sizeof(int), NULL)==SUCCESS) { + if( !opened_path ) { + opened_path = file_handle.opened_path = estrdup(inc_filename->value.str.val); + } + + if (zend_hash_add(&EG(included_files), opened_path, strlen(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); opened_path = NULL; /* zend_destroy_file_handle() already frees it */