Changeset 31158
- Timestamp:
- 01/12/2015 04:20:47 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
src/wp-includes/ms-blogs.php (modified) (1 diff)
-
tests/phpunit/tests/multisite/site.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-blogs.php
r31157 r31158 299 299 foreach ( array_intersect( array_keys( $details ), $fields ) as $field ) { 300 300 if ( 'path' === $field ) { 301 $details[ $field ] = array_filter( explode( '/', $details[ $field ] ) ); 302 $details[ $field ] = trailingslashit( '/' . implode( '/', $details[ $field ] ) ); 301 $details[ $field ] = trailingslashit( '/' . trim( $details[ $field ], '/' ) ); 303 302 } 304 303 -
trunk/tests/phpunit/tests/multisite/site.php
r31157 r31158 592 592 } 593 593 594 /** 595 * `update_blog_details()` does not resolve multiple slashes in the 596 * middle of a path string. 597 */ 594 598 function test_update_blog_details_multiple_paths_middle_slashes() { 595 599 update_blog_details( 1, array( 'path' => 'multiple///dirs' ) ); 596 600 $blog = get_blog_details( 1 ); 597 $this->assertEquals( '/multiple/ dirs/', $blog->path );601 $this->assertEquals( '/multiple///dirs/', $blog->path ); 598 602 } 599 603
Note: See TracChangeset
for help on using the changeset viewer.