Make WordPress Core

Ticket #25767: 25767.diff

File 25767.diff, 807 bytes (added by johnbillion, 10 years ago)
  • src/wp-admin/includes/file.php

     
    7979 * @return string Full filesystem path to the root of the WordPress installation
    8080 */
    8181function get_home_path() {
    82         $home = get_option( 'home' );
    83         $siteurl = get_option( 'siteurl' );
     82        $home    = set_url_scheme( get_option( 'home' ), 'http' );
     83        $siteurl = set_url_scheme( get_option( 'siteurl' ), 'http' );
    8484        if ( ! empty( $home ) && 0 !== strcasecmp( $home, $siteurl ) ) {
    8585                $wp_path_rel_to_home = str_ireplace( $home, '', $siteurl ); /* $siteurl - $home */
    8686                $pos = strripos( str_replace( '\\', '/', $_SERVER['SCRIPT_FILENAME'] ), trailingslashit( $wp_path_rel_to_home ) );