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

git-svn-id: https://develop.svn.wordpress.org/trunk@26031 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2013-11-07 03:33:11 +00:00
parent 245b99ceb1
commit 24c2774076
1 changed files with 1 additions and 1 deletions

View File

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