mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 12:44:31 +00:00
Coding Standards: Use strict comparison where strlen() is involved.
Follow-up to [649], [1345], [3034], [6132], [6314], [6974], [55642]. Props aristath, poena, afercia, SergeyBiryukov. See #57839. git-svn-id: https://develop.svn.wordpress.org/trunk@55652 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -40,7 +40,9 @@ function wp_fix_server_vars() {
|
||||
$_SERVER = array_merge( $default_server_values, $_SERVER );
|
||||
|
||||
// Fix for IIS when running with PHP ISAPI.
|
||||
if ( empty( $_SERVER['REQUEST_URI'] ) || ( 'cgi-fcgi' !== PHP_SAPI && preg_match( '/^Microsoft-IIS\//', $_SERVER['SERVER_SOFTWARE'] ) ) ) {
|
||||
if ( empty( $_SERVER['REQUEST_URI'] )
|
||||
|| ( 'cgi-fcgi' !== PHP_SAPI && preg_match( '/^Microsoft-IIS\//', $_SERVER['SERVER_SOFTWARE'] ) )
|
||||
) {
|
||||
|
||||
if ( isset( $_SERVER['HTTP_X_ORIGINAL_URL'] ) ) {
|
||||
// IIS Mod-Rewrite.
|
||||
@@ -71,7 +73,9 @@ function wp_fix_server_vars() {
|
||||
}
|
||||
|
||||
// Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something ending in php.cgi for all requests.
|
||||
if ( isset( $_SERVER['SCRIPT_FILENAME'] ) && ( 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'];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user