Make WordPress Core


Ignore:
Timestamp:
11/07/2013 03:33:11 AM (10 years ago)
Author:
dd32
Message:

Fix a case where wp_guess_url() would leave a prefixed path in the generated URL when symlinks were involved. Fixes #25797

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r26022 r26031  
    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;
Note: See TracChangeset for help on using the changeset viewer.