diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | main/main.c | 3 |
2 files changed, 2 insertions, 2 deletions
@@ -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). diff --git a/main/main.c b/main/main.c index b9249ba4f0..37a13b3cc1 100644 --- a/main/main.c +++ b/main/main.c @@ -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); |