Make WordPress Core

Ticket #25797: 25797.diff

File 25797.diff, 860 bytes (added by dd32, 10 years ago)
  • src/wp-includes/functions.php

     
    32543254                                $path = preg_replace( '#/' . preg_quote( $directory, '#' ) . '/[^/]*$#i', '' , $_SERVER['REQUEST_URI'] );
    32553255                        } elseif ( false !== strpos( $abspath_fix, $script_filename_dir ) ) {
    32563256                                // Request is hitting a file above ABSPATH
    3257                                 $subdirectory = str_replace( $script_filename_dir, '', $abspath_fix );
     3257                                $subdirectory = substr( $abspath_fix, strpos( $abspath_fix, $script_filename_dir ) + strlen( $script_filename_dir ) );
    32583258                                // Strip off any file/query params from the path, appending the sub directory to the install
    32593259                                $path = preg_replace( '#/[^/]*$#i', '' , $_SERVER['REQUEST_URI'] ) . $subdirectory;
    32603260                        } else {