mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Remove trailing slashes from UPLOADS before trying a str_replace() in wp_upload_dir(). props jbrinley. fixes #22469
* In 3.4.x, both $url and UPLOADS had trailing slashes * Due to refactoring, $url is no longer expected to have a trailing slash * Because of the mismatch, the str_replace() was not working, resulting in an incorrectly verbose upload dir URL git-svn-id: http://core.svn.wordpress.org/trunk@22736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
418c9985f7
commit
4fcb87234b
@ -1540,7 +1540,7 @@ function wp_upload_dir( $time = null ) {
|
||||
|
||||
if ( defined( 'BLOGUPLOADDIR' ) )
|
||||
$dir = untrailingslashit( BLOGUPLOADDIR );
|
||||
$url = str_replace( UPLOADS, 'files', $url );
|
||||
$url = str_replace( untrailingslashit( UPLOADS ), 'files', $url );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user