Make WordPress Core


Ignore:
Timestamp:
04/24/2020 07:26:57 AM (4 years 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/class-http.php

    r47557 r47617  
    270270        }
    271271
    272         $arrURL = @parse_url( $url );
     272        $arrURL = parse_url( $url );
    273273
    274274        if ( empty( $url ) || empty( $arrURL['scheme'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.