mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
General: Remove redundant ltrim() from path_join().
If the path starts with a slash, it will be considered absolute and returned as is earlier in the function. It it's not absolute, then it does not start with a slash, so there is nothing to trim. This change is covered by existing unit tests. Follow-up to [6984], [53457]. Props karlijnbk. See #55897. git-svn-id: https://develop.svn.wordpress.org/trunk@53460 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2132,7 +2132,7 @@ function path_join( $base, $path ) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
return rtrim( $base, '/' ) . '/' . ltrim( $path, '/' );
|
||||
return rtrim( $base, '/' ) . '/' . $path;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user