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. Built from https://develop.svn.wordpress.org/trunk@47617 git-svn-id: http://core.svn.wordpress.org/trunk@47392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -622,7 +622,7 @@ function rss2_site_icon() {
|
||||
* @return string Correct link for the atom:self element.
|
||||
*/
|
||||
function get_self_link() {
|
||||
$host = @parse_url( home_url() );
|
||||
$host = parse_url( home_url() );
|
||||
return set_url_scheme( 'http://' . $host['host'] . wp_unslash( $_SERVER['REQUEST_URI'] ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user