WordPress.org

Make WordPress Core

Ticket #23175: 23175.patch

File 23175.patch, 1.3 KB (added by SergeyBiryukov, 5 years ago)
  • wp-admin/includes/file.php

     
    8787                $home_path = substr( $_SERVER['SCRIPT_FILENAME'], 0, $pos );
    8888                $home_path = trailingslashit( $home_path );
    8989        } else {
    90                 $home_path = ABSPATH;
     90                $home_path = str_replace( '\\', '/', ABSPATH );
    9191        }
    9292
    9393        return $home_path;
  • wp-admin/network.php

     
    314314        $base              = parse_url( $slashed_home, PHP_URL_PATH );
    315315        $document_root_fix = str_replace( '\\', '/', realpath( $_SERVER['DOCUMENT_ROOT'] ) );
    316316        $abspath_fix       = str_replace( '\\', '/', ABSPATH );
    317         $home_path         = 0 === strpos( $abspath_fix, $document_root_fix ) ? $document_root_fix . $base : str_replace( '\\', '/', get_home_path() );
     317        $home_path         = 0 === strpos( $abspath_fix, $document_root_fix ) ? $document_root_fix . $base : get_home_path();
    318318        $wp_siteurl_subdir = preg_replace( '#^' . preg_quote( $home_path, '#' ) . '#', '', $abspath_fix );
    319319        $rewrite_base      = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : '';
    320320