WordPress.org

Make WordPress Core

Ticket #20449: 20449.2.patch

File 20449.2.patch, 748 bytes (added by WraithKenny, 2 years ago)
  • wp-admin/includes/file.php

     
    8383        $siteurl = get_option( 'siteurl' ); 
    8484        if ( ! empty( $home ) && 0 !== strcasecmp( $home, $siteurl ) ) { 
    8585                $wp_path_rel_to_home = str_ireplace( $home, '', $siteurl ); /* $siteurl - $home */ 
    86                 $pos = strripos( str_replace( '\\', '/', $_SERVER['SCRIPT_FILENAME'] ), $wp_path_rel_to_home); 
     86                $pos = strripos( str_replace( '\\', '/', $_SERVER['SCRIPT_FILENAME'] ), trailingslashit( $wp_path_rel_to_home ) ); 
    8787                $home_path = substr( $_SERVER['SCRIPT_FILENAME'], 0, $pos ); 
    8888                $home_path = trailingslashit( $home_path ); 
    8989        } else {