mirror of
https://github.com/Mibew/open-street-map-history-plugin.git
synced 2024-11-15 00:34:13 +03:00
Fix issue with undefined index in results coming from OpenSourceMap plugin
This commit is contained in:
parent
56235823a4
commit
e5f734bb7b
@ -44,7 +44,7 @@ class GeoIPDataController extends AbstractController
|
|||||||
$osm_plugin = PluginManager::getInstance()->getPlugin('Mibew:OpenStreetMap');
|
$osm_plugin = PluginManager::getInstance()->getPlugin('Mibew:OpenStreetMap');
|
||||||
$osm_plugin->usersFunctionCallHandler($geo_data);
|
$osm_plugin->usersFunctionCallHandler($geo_data);
|
||||||
|
|
||||||
$results = $geo_data['errorCode'] ? array() : $geo_data['results'];
|
$results = array_key_exists('errorCode', $geo_data) && $geo_data['errorCode'] ? array() : $geo_data['results'];
|
||||||
return new JsonResponse($results);
|
return new JsonResponse($results);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user