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

Built from https://develop.svn.wordpress.org/trunk@26031


git-svn-id: http://core.svn.wordpress.org/trunk@25961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2013-11-07 03:34:10 +00:00
parent 904acbc865
commit 560b0c8b0a
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 {