From 880f8c8ba3cf21c3adf08f224d6956c407640688 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@3408 602fd350-edb4-49c9-b593-d223f7449a82 --- 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