From c1ed565c238898d39d8d9a7e01b392bbf0552ad4 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 6 Jan 2006 01:05:59 +0000 Subject: [PATCH] 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 --- wp-settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-settings.php b/wp-settings.php index f7ce8f8921..de8d065f4a 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -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 -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']; // Fix for Dreamhost and other PHP as CGI hosts