Skip to content

Commit

Permalink
Use GuzzleHttp\Url instead of SimplePie_IRI for absolutization
Browse files Browse the repository at this point in the history
SimplePie_IRI is supposedly buggy and SimplePie wants to get rid
of it in favour of some networking library anyway.
  • Loading branch information
jtojnar committed Jun 15, 2017
1 parent 916f3c6 commit f56ac49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion helpers/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace helpers;

use Elphin\IcoFileLoader\IcoFileService;
use GuzzleHttp;
use WideImage\WideImage;

/**
Expand Down Expand Up @@ -58,7 +59,7 @@ public function fetchFavicon($url, $isHtmlUrl = false, $width = false, $height =

$shortcutIcon = $this->parseShortcutIcon($html);
if ($shortcutIcon !== null) {
$shortcutIcon = (string) \SimplePie_IRI::absolutize($url, $shortcutIcon);
$shortcutIcon = (string) GuzzleHttp\Url::fromString($url)->combine($shortcutIcon);

$faviconAsPng = $this->loadImage($shortcutIcon, $width, $height);
if ($faviconAsPng !== false) {
Expand Down

0 comments on commit f56ac49

Please sign in to comment.