WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/24/2020 07:26:57 AM (21 months ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Remove error suppression from parse_url() calls.

Previously, the @ operator was used to prevent possible warnings emitted by parse_url() in PHP < 5.3.3 when URL parsing failed.

Now that the minimum version of PHP required by WordPress is 5.6.20, this is no longer needed.

Props netpassprodsr, Howdy_McGee.
Fixes #49980. See #24780.

File:
1 edited

Legend:

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

    r47397 r47617  
    623623 */
    624624function get_self_link() {
    625     $host = @parse_url( home_url() );
     625    $host = parse_url( home_url() );
    626626    return set_url_scheme( 'http://' . $host['host'] . wp_unslash( $_SERVER['REQUEST_URI'] ) );
    627627}
Note: See TracChangeset for help on using the changeset viewer.