]> granicus.if.org Git - php/commitdiff
Fixed bug #38904 (apache2filter changes cwd to /).
authorIlia Alshanetsky <iliaa@php.net>
Mon, 25 Sep 2006 14:48:33 +0000 (14:48 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 25 Sep 2006 14:48:33 +0000 (14:48 +0000)
NEWS
main/main.c

diff --git a/NEWS b/NEWS
index 651ba325406d62d603296fde5fb1fd188f2aaf59..a3c80dbc173bfba63dc76c3f0963e1fa7cf9e995 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ PHP                                                                        NEWS
   (Dmitry)
 - Fixed bug #38941 (imap extension does not compile against new version of
   the imap library). (Ilia)
+- Fixed bug #38904 (apache2filter changes cwd to /). (Ilia, bjori)
 - Fixed bug #38844 (curl_easy_strerror() is defined only since cURL 7.12.0).
   (Tony)
 - Fixed bug #38623 (leaks in a tricky code with switch() and exceptions).
index b9249ba4f092748b1e351776d08483e538a94f50..37a13b3cc1e38f5d6111d207e00eee3c3ba311cc 100644 (file)
@@ -1704,8 +1704,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC)
 
                PG(during_request_startup) = 0;
 
-               if (primary_file->type == ZEND_HANDLE_FILENAME 
-                               && primary_file->filename) {
+               if ((primary_file->type == ZEND_HANDLE_FILENAME || primary_file->type == ZEND_HANDLE_STREAM) && primary_file->filename) {
 #if HAVE_BROKEN_GETCWD
                        /* this looks nasty to me */
                        old_cwd_fd = open(".", 0);