WordPress.org

Make WordPress Core

Ticket #18768: ticket.18768.diff

File ticket.18768.diff, 638 bytes (added by ptahdunbar, 3 years ago)
  • wp-admin/includes/file.php

     
    8181        $siteurl = get_option( 'siteurl' ); 
    8282        if ( $home != '' && $home != $siteurl ) { 
    8383                $wp_path_rel_to_home = str_replace($home, '', $siteurl); /* $siteurl - $home */ 
    84                 $pos = strpos($_SERVER["SCRIPT_FILENAME"], $wp_path_rel_to_home); 
     84                $pos = strrpos($_SERVER["SCRIPT_FILENAME"], $wp_path_rel_to_home); 
    8585                $home_path = substr($_SERVER["SCRIPT_FILENAME"], 0, $pos); 
    8686                $home_path = trailingslashit( $home_path ); 
    8787        } else {