Make WordPress Core

Changeset 36446


Ignore:
Timestamp:
02/02/2016 04:33:02 PM (9 years ago)
Author:
ocean90
Message:

Suppress possible warnings in PHP < 5.3.3 by parse_url() in wp_validate_redirect().

PHP 5.3.3 removed the E_WARNING that was emitted when URL parsing failed.

File:
1 edited

Legend:

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

    r36445 r36446  
    13271327    $test = ( $cut = strpos($location, '?') ) ? substr( $location, 0, $cut ) : $location;
    13281328
    1329     $lp  = parse_url($test);
     1329    // @-operator is used to prevent possible warnings in PHP < 5.3.3.
     1330    $lp = @parse_url($test);
    13301331
    13311332    // Give up if malformed URL
Note: See TracChangeset for help on using the changeset viewer.