Skip to content

Commit

Permalink
Merge pull request #4 from prezly-forks/fix/variable-type-error
Browse files Browse the repository at this point in the history
Fix variable type error
  • Loading branch information
mpclarkson authored Mar 2, 2017
2 parents fc315fb + b48019b commit e9de2d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/IconScraper/Scraper.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function info($url)

$max_loop = 5;

// Discover real status by following redirects.
// Discover real status by following redirects.
$loop = true;
$status = null;
while ($loop && $max_loop-- > 0) {
Expand Down Expand Up @@ -165,13 +165,13 @@ private function getIcons($url) {
}

$size = $link->hasAttribute('sizes') ? $link->getAttribute('sizes') : [];
$size = !is_array($size) ? explode('x', $size) : $size;

$type = false;

switch(strtolower($attribute)) {
case Icon::APPLE_TOUCH:
$type = Icon::APPLE_TOUCH;
$size = !is_array($size) ? explode('x', $size) : $size;
break;
default:
if(strpos($link->getAttribute('href'), 'icon') !== FALSE) {
Expand Down

0 comments on commit e9de2d3

Please sign in to comment.