Pings/Trackbacks: Avoid a PHP notice in `do_enclose()` when encountering a URL without a path in post content.
Props jbouganim, mukesh27, Otto42, SergeyBiryukov. Fixes #49872. Built from https://develop.svn.wordpress.org/trunk@48621 git-svn-id: http://core.svn.wordpress.org/trunk@48383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d8c62b5647
commit
6731940272
|
@ -907,7 +907,7 @@ function do_enclose( $content = null, $post ) {
|
||||||
|
|
||||||
// Check to see if we can figure out the mime type from the extension.
|
// Check to see if we can figure out the mime type from the extension.
|
||||||
$url_parts = parse_url( $url );
|
$url_parts = parse_url( $url );
|
||||||
if ( false !== $url_parts ) {
|
if ( false !== $url_parts && ! empty( $url_parts['path'] ) ) {
|
||||||
$extension = pathinfo( $url_parts['path'], PATHINFO_EXTENSION );
|
$extension = pathinfo( $url_parts['path'], PATHINFO_EXTENSION );
|
||||||
if ( ! empty( $extension ) ) {
|
if ( ! empty( $extension ) ) {
|
||||||
foreach ( wp_get_mime_types() as $exts => $mime ) {
|
foreach ( wp_get_mime_types() as $exts => $mime ) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-beta3-48620';
|
$wp_version = '5.5-beta3-48621';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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