adapt warm.php to new Result objects

Fixes #1276.
This commit is contained in:
Sarah Hoffmann 2019-01-08 22:45:21 +01:00
parent 72d19cd523
commit 1c85edbda9

View File

@ -35,13 +35,9 @@ if (!$aResult['search-only']) {
$fLat = rand(-9000, 9000) / 100;
$fLon = rand(-18000, 18000) / 100;
if ($bVerbose) echo "$fLat, $fLon = ";
$aLookup = $oReverseGeocode->lookup($fLat, $fLon);
if ($aLookup && $aLookup['place_id']) {
$aDetails = $oPlaceLookup->lookup(
(int)$aLookup['place_id'],
$aLookup['type'],
$aLookup['fraction']
);
$oLookup = $oReverseGeocode->lookup($fLat, $fLon);
if ($oLookup) {
$aDetails = $oPlaceLookup->lookup(array($oLookup->iId => $oLookup));
if ($bVerbose) echo $aDetails['langaddress']."\n";
} else {
echo '.';