Check if SCRIPT_FILENAME is set to avoid warnings. fixes #2227

git-svn-id: http://svn.automattic.com/wordpress/trunk@3408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-01-06 01:05:59 +00:00
parent 63e1963e19
commit c1ed565c23

View File

@ -35,7 +35,7 @@ if ( empty( $_SERVER['REQUEST_URI'] ) ) {
} }
// Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests // Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests
if ( strpos($_SERVER['SCRIPT_FILENAME'], 'php.cgi') == strlen($_SERVER['SCRIPT_FILENAME']) - 7 ) if ( isset($_SERVER['SCRIPT_FILENAME']) && ( strpos($_SERVER['SCRIPT_FILENAME'], 'php.cgi') == strlen($_SERVER['SCRIPT_FILENAME']) - 7 ) )
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED']; $_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'];
// Fix for Dreamhost and other PHP as CGI hosts // Fix for Dreamhost and other PHP as CGI hosts