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

index 9121c92698812c30c02789ac8aef0e939dab19c9..73bfdc89f029a42e3a2eee645583ade78e62456a 100644 (file)
@@ -1859,8 +1859,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);