Commit be89fbf5 authored by Sergey Biryukov's avatar Sergey Biryukov
Browse files

Pings/Trackbacks: Avoid a PHP notice in `do_enclose()` when encountering a URL...

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: https://core.svn.wordpress.org/trunk@48383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 6f96a054
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -907,7 +907,7 @@ function do_enclose( $content = null, $post ) {

				// Check to see if we can figure out the mime type from the extension.
				$url_parts = parse_url( $url );
				if ( false !== $url_parts ) {
				if ( false !== $url_parts && ! empty( $url_parts['path'] ) ) {
					$extension = pathinfo( $url_parts['path'], PATHINFO_EXTENSION );
					if ( ! empty( $extension ) ) {
						foreach ( wp_get_mime_types() as $exts => $mime ) {
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
 *
 * @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.