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

git-svn-id: https://develop.svn.wordpress.org/trunk@3408 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-01-06 01:05:59 +00:00
parent eafd28b05d
commit 880f8c8ba3

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