cvs: Zend / zend_execute.c
| From: | Zeev Suraski | Date: | Sat, 17 Aug 2002 16:21:55 +0000 |
| Subject: | cvs: Zend / zend_execute.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-325@lists.php.net to get a copy of this message | ||
zeev Sat Aug 17 12:21:55 2002 EDT
Modified files:
/Zend zend_execute.c
Log:
Fix require_once/include_once support for URL's (patch by Ilya)
Index: Zend/zend_execute.c
diff -u Zend/zend_execute.c:1.300 Zend/zend_execute.c:1.301
--- Zend/zend_execute.c:1.300 Fri Aug 2 16:21:38 2002
+++ Zend/zend_execute.c Sat Aug 17 12:21:55 2002
@@ -2093,7 +2093,11 @@
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 */