WordPress.org

Make WordPress Core

Ticket #54142: 54142.1.diff

File 54142.1.diff, 483 bytes (added by audrasjb, 7 weeks ago)

Patch refreshed against trunk for 5.9

  • src/wp-includes/load.php

    diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php
    index ffbc1d2290..4d5fe9697a 100644
    a b function wp_fix_server_vars() { 
    7676        }
    7777
    7878        // Fix for Dreamhost and other PHP as CGI hosts.
    79         if ( strpos( $_SERVER['SCRIPT_NAME'], 'php.cgi' ) !== false ) {
     79        if ( isset( $_SERVER['SCRIPT_NAME'] ) && ( strpos( $_SERVER['SCRIPT_NAME'], 'php.cgi' ) !== false ) ) {
    8080                unset( $_SERVER['PATH_INFO'] );
    8181        }
    8282