diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-09-25 14:48:33 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-09-25 14:48:33 +0000 |
commit | ccc25cc3eb46c87d8f83f73c66a503e9f29fad07 (patch) | |
tree | d1475149364b0277769609f8eb9010aaba88dafe | |
parent | f36b3ca9adf594d24c6b949f7387aad0dd32d8b6 (diff) | |
download | php-git-ccc25cc3eb46c87d8f83f73c66a503e9f29fad07.tar.gz |
Fixed bug #38904 (apache2filter changes cwd to /).
-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); |