WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/24/2020 07:26:57 AM (13 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/pluggable.php

    r47554 r47617  
    14241424        $test = $cut ? substr( $location, 0, $cut ) : $location;
    14251425
    1426         // @-operator is used to prevent possible warnings in PHP < 5.3.3.
    1427         $lp = @parse_url( $test );
     1426        $lp = parse_url( $test );
    14281427
    14291428        // Give up if malformed URL.
Note: See TracChangeset for help on using the changeset viewer.