Canonical: Check first before attempting to include a 'path' value in the URL in strip_fragment_from_url()
.
Props Mte90. Fixes #40542. git-svn-id: https://develop.svn.wordpress.org/trunk@41257 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1111c54b14
commit
cbaa63caeb
@ -568,7 +568,11 @@ function strip_fragment_from_url( $url ) {
|
||||
if ( ! empty( $parsed_url['port'] ) ) {
|
||||
$url .= ':' . $parsed_url['port'];
|
||||
}
|
||||
$url .= $parsed_url['path'];
|
||||
|
||||
if ( ! empty( $parsed_url['path'] ) ) {
|
||||
$url .= $parsed_url['path'];
|
||||
}
|
||||
|
||||
if ( ! empty( $parsed_url['query'] ) ) {
|
||||
$url .= '?' . $parsed_url['query'];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user