Skip to content

Commit

Permalink
Fixed bug with offset
Browse files Browse the repository at this point in the history
  • Loading branch information
tholu committed Aug 1, 2014
1 parent 93ec1d2 commit aa36b57
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions SEOstats/Services/Sistrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ public static function getVisibilityIndex($url = false)
$html = parent::_getPage($dataUrl);
@preg_match_all('#<h3>(.*?)<\/h3>#si', $html, $matches);

$vi = str_replace(',','.',$matches[1][0]);

return isset($vi) ? $vi : parent::noDataDefaultValue();
if(isset($matches[1][0])) {
$vi = str_replace(',','.',$matches[1][0]);
return $vi;
} else {
return parent::noDataDefaultValue();
}
}

/**
Expand Down

0 comments on commit aa36b57

Please sign in to comment.