From aa36b577d603d0b5ae0baeddc06630139d523371 Mon Sep 17 00:00:00 2001 From: Thomas Lutz Date: Fri, 1 Aug 2014 13:16:13 +0200 Subject: [PATCH] Fixed bug with offset --- SEOstats/Services/Sistrix.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SEOstats/Services/Sistrix.php b/SEOstats/Services/Sistrix.php index db7b7730..26c775d3 100644 --- a/SEOstats/Services/Sistrix.php +++ b/SEOstats/Services/Sistrix.php @@ -49,9 +49,12 @@ public static function getVisibilityIndex($url = false) $html = parent::_getPage($dataUrl); @preg_match_all('#

(.*?)<\/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(); + } } /**