Bugfixing for CurlResult

This commit is contained in:
Philipp Holzer 2018-10-11 07:40:57 +02:00
parent ce2af45897
commit 2e8d9ba39b
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
9 changed files with 13 additions and 14 deletions

View file

@ -129,9 +129,9 @@ function openstreetmap_get_coordinates($a, &$b)
$j = Cache::get($cachekey);
if (is_null($j)) {
$x = Network::curl($nomserver . $args);
if ($x['success']) {
$j = json_decode($x['body'], true);
$curlResult = Network::curl($nomserver . $args);
if ($curlResult->isSuccess()) {
$j = json_decode($curlResult->getBody(), true);
Cache::set($cachekey, $j, CACHE_MONTH);
}
}