|
@@ -43,7 +43,11 @@ class Webservice
|
|
|
foreach ($params as $param => $value) {
|
|
|
$url .= "&filters[{$param}]=$value";
|
|
|
}
|
|
|
- $objectsJson = json_decode(file_get_contents($url), true);
|
|
|
+ try {
|
|
|
+ $objectsJson = json_decode(file_get_contents($url), true);
|
|
|
+ } catch (\Exception $ex) {
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return $objectsJson;
|
|
@@ -79,7 +83,12 @@ class Webservice
|
|
|
$url .= "&offset={$offset}";
|
|
|
}
|
|
|
|
|
|
- $data = json_decode(file_get_contents($url), true);
|
|
|
+ $data = array();
|
|
|
+ try {
|
|
|
+ $data = json_decode(file_get_contents($url), true);
|
|
|
+ } catch (\Exception $ex) {
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
//$data['url'] = $url;
|
|
|
|