Canonical: Check first before attempting to include a 'path' value in the URL in `strip_fragment_from_url()`.
Props Mte90. Fixes #40542. Built from https://develop.svn.wordpress.org/trunk@41257 git-svn-id: http://core.svn.wordpress.org/trunk@41097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ea92bb5f10
commit
e80cf1d861
|
@ -568,7 +568,11 @@ function strip_fragment_from_url( $url ) {
|
||||||
if ( ! empty( $parsed_url['port'] ) ) {
|
if ( ! empty( $parsed_url['port'] ) ) {
|
||||||
$url .= ':' . $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'] ) ) {
|
if ( ! empty( $parsed_url['query'] ) ) {
|
||||||
$url .= '?' . $parsed_url['query'];
|
$url .= '?' . $parsed_url['query'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.9-alpha-41256';
|
$wp_version = '4.9-alpha-41257';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue