WordPress.org

Make WordPress Core

Ticket #31384: 31384.diff

File 31384.diff, 537 bytes (added by dshanske, 4 years ago)

Switch to wp_parse_url which has backward compatibility

  • src/wp-includes/comment.php

    diff --git src/wp-includes/comment.php src/wp-includes/comment.php
    index f579e95..4a4299f 100644
    function discover_pingback_server_uri( $url, $deprecated = '' ) { 
    22022202        $pingback_str_squote = 'rel=\'pingback\'';
    22032203
    22042204        /** @todo Should use Filter Extension or custom preg_match instead. */
    2205         $parsed_url = parse_url($url);
     2205        $parsed_url = wp_parse_url($url);
    22062206
    22072207        if ( ! isset( $parsed_url['host'] ) ) // Not a URL. This should never happen.
    22082208                return false;