Make WordPress Core


Ignore:
Timestamp:
07/26/2020 02:06:03 PM (5 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r48607 r48621  
    908908                // Check to see if we can figure out the mime type from the extension.
    909909                $url_parts = parse_url( $url );
    910                 if ( false !== $url_parts ) {
     910                if ( false !== $url_parts && ! empty( $url_parts['path'] ) ) {
    911911                    $extension = pathinfo( $url_parts['path'], PATHINFO_EXTENSION );
    912912                    if ( ! empty( $extension ) ) {
Note: See TracChangeset for help on using the changeset viewer.