mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@47617 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1423,8 +1423,7 @@ if ( ! function_exists( 'wp_validate_redirect' ) ) :
|
||||
$cut = strpos( $location, '?' );
|
||||
$test = $cut ? substr( $location, 0, $cut ) : $location;
|
||||
|
||||
// @-operator is used to prevent possible warnings in PHP < 5.3.3.
|
||||
$lp = @parse_url( $test );
|
||||
$lp = parse_url( $test );
|
||||
|
||||
// Give up if malformed URL.
|
||||
if ( false === $lp ) {
|
||||
|
||||
Reference in New Issue
Block a user