Strip backslashes, not just forward slashes, from untrailingslashit().
trailingslashit() will now remove any forward or backslashes from the end of a string before appending a forward slash. props knutsp, willmot. fixes #22267. Built from https://develop.svn.wordpress.org/trunk@27344 git-svn-id: http://core.svn.wordpress.org/trunk@27196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1455,17 +1455,17 @@ function get_temp_dir() {
|
||||
return trailingslashit(WP_TEMP_DIR);
|
||||
|
||||
if ( $temp )
|
||||
return trailingslashit( rtrim( $temp, '\\' ) );
|
||||
return trailingslashit( $temp );
|
||||
|
||||
if ( function_exists('sys_get_temp_dir') ) {
|
||||
$temp = sys_get_temp_dir();
|
||||
if ( @is_dir( $temp ) && wp_is_writable( $temp ) )
|
||||
return trailingslashit( rtrim( $temp, '\\' ) );
|
||||
return trailingslashit( $temp );
|
||||
}
|
||||
|
||||
$temp = ini_get('upload_tmp_dir');
|
||||
if ( @is_dir( $temp ) && wp_is_writable( $temp ) )
|
||||
return trailingslashit( rtrim( $temp, '\\' ) );
|
||||
return trailingslashit( $temp );
|
||||
|
||||
$temp = WP_CONTENT_DIR . '/';
|
||||
if ( is_dir( $temp ) && wp_is_writable( $temp ) )
|
||||
|
||||
Reference in New Issue
Block a user