cvs: php4 /main main.c

From: Date: Sun, 30 Jun 2002 13:38:16 +0000
Subject: cvs: php4 /main main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12643@lists.php.net to get a copy of this message
sander Sun Jun 30 09:38:16 2002 EDT Modified files: /php4/main main.c Log: Main script should not be parsed when (include|require)_once()'ed, #17720 # Derick, MFH? Index: php4/main/main.c diff -u php4/main/main.c:1.461 php4/main/main.c:1.462 --- php4/main/main.c:1.461 Wed Jun 26 15:43:46 2002 +++ php4/main/main.c Sun Jun 30 09:38:16 2002 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.461 2002/06/26 19:43:46 derick Exp $ */ +/* $Id: main.c,v 1.462 2002/06/30 13:38:16 sander Exp $ */ /* {{{ includes */ @@ -1354,6 +1354,16 @@ && primary_file->filename) { VCWD_GETCWD(old_cwd, OLD_CWD_SIZE-1); VCWD_CHDIR_FILE(primary_file->filename); + } + + if(primary_file->filename) { + char *realfile; + int dummy = 1; + realfile = emalloc(PATH_MAX); + if(realpath(primary_file->filename, realfile)) { + zend_hash_add(&EG(included_files), realfile, strlen(realfile)+1, (void *)&dummy, sizeof(int), NULL); + } + efree(realfile); } if (PG(auto_prepend_file) && PG(auto_prepend_file)[0]) {

« previous php.cvs (#12643) next »