Make WordPress Core


Ignore:
Timestamp:
04/24/2020 07:26:57 AM (3 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-wp-http-cookie.php

    r47557 r47617  
    9494    public function __construct( $data, $requested_url = '' ) {
    9595        if ( $requested_url ) {
    96             $arrURL = @parse_url( $requested_url );
     96            $arrURL = parse_url( $requested_url );
    9797        }
    9898        if ( isset( $arrURL['host'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.