From 1c85edbda976ff0b06b21ee31973eecafc181231 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 8 Jan 2019 22:45:21 +0100 Subject: [PATCH] adapt warm.php to new Result objects Fixes #1276. --- utils/warm.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/utils/warm.php b/utils/warm.php index 5e1b3eed..96372aec 100644 --- a/utils/warm.php +++ b/utils/warm.php @@ -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 '.'; -- 2.43.2