]> granicus.if.org Git - php/commitdiff
MFZE1
authorZeev Suraski <zeev@php.net>
Sat, 17 Aug 2002 16:22:40 +0000 (16:22 +0000)
committerZeev Suraski <zeev@php.net>
Sat, 17 Aug 2002 16:22:40 +0000 (16:22 +0000)
Zend/zend_execute.c

index d397ccf38760bc37614f5c764312a3601b114647..5bdbaa230e3ba0c7ed15825d6e390d0b74a93f9a 100644 (file)
@@ -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 */