Make WordPress Core

Changeset 22736


Ignore:
Timestamp:
11/21/2012 07:08:38 AM (12 years ago)
Author:
markjaquith
Message:

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
File:
1 edited

Legend:

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

    r22634 r22736  
    15411541            if ( defined( 'BLOGUPLOADDIR' ) )
    15421542                $dir = untrailingslashit( BLOGUPLOADDIR );
    1543             $url = str_replace( UPLOADS, 'files', $url );
     1543            $url = str_replace( untrailingslashit( UPLOADS ), 'files', $url );
    15441544        }
    15451545    }
Note: See TracChangeset for help on using the changeset viewer.