This commit is contained in:
foobar 2002-09-29 19:22:39 +00:00
parent 0e7e7ae961
commit 7aaa6bd77d

View file

@ -1505,11 +1505,11 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC)
VCWD_CHDIR_FILE(primary_file->filename); VCWD_CHDIR_FILE(primary_file->filename);
} }
if(primary_file->filename) { if (primary_file->filename) {
char realfile[MAXPATHLEN]; char realfile[MAXPATHLEN];
int realfile_len; int realfile_len;
int dummy = 1; int dummy = 1;
if(VCWD_REALPATH(primary_file->filename, realfile)) { if (VCWD_REALPATH(primary_file->filename, realfile)) {
realfile_len = strlen(realfile); realfile_len = strlen(realfile);
zend_hash_add(&EG(included_files), realfile, realfile_len+1, (void *)&dummy, sizeof(int), NULL); zend_hash_add(&EG(included_files), realfile, realfile_len+1, (void *)&dummy, sizeof(int), NULL);
primary_file->opened_path = emalloc(realfile_len+1); primary_file->opened_path = emalloc(realfile_len+1);
@ -1527,6 +1527,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC)
} else { } else {
prepend_file_p = NULL; prepend_file_p = NULL;
} }
if (PG(auto_append_file) && PG(auto_append_file)[0]) { if (PG(auto_append_file) && PG(auto_append_file)[0]) {
append_file.filename = PG(auto_append_file); append_file.filename = PG(auto_append_file);
append_file.opened_path = NULL; append_file.opened_path = NULL;