Skip to content

Commit

Permalink
URL Details: Avoid PHP notice when parsing protocol-relative icon URLs (
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka authored Jul 30, 2021
1 parent 1d683e3 commit 2b1a1d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/class-wp-rest-url-details-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ private function get_icon( $html, $url ) {

// If the icon is a data URL, return it.
$parsed_icon = parse_url( $icon );
if ( 'data' === $parsed_icon['scheme'] ) {
if ( isset( $parsed_icon['schema'] ) && 'data' === $parsed_icon['scheme'] ) {
return $icon;
}

Expand Down

0 comments on commit 2b1a1d7

Please sign in to comment.