From: Sarah Hoffmann Date: Sun, 9 Oct 2016 19:14:59 +0000 (+0200) Subject: avoid passing temporary array by reference X-Git-Tag: v3.0.0~112 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/f5641037cff6f96708baa157b00287930196474d?ds=inline avoid passing temporary array by reference PHP7 complains: Only variables should be passed by reference. --- diff --git a/lib/Geocode.php b/lib/Geocode.php index cf05df12..21f36869 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -1552,7 +1552,7 @@ class Geocode // getAddressDetails() is defined in lib.php and uses the SQL function get_addressdata in functions.sql $aResult['address'] = getAddressDetails($this->oDB, $sLanguagePrefArraySQL, $aResult['place_id'], $aResult['country_code'], $aResultPlaceIDs[$aResult['place_id']]); if ($aResult['extra_place'] == 'city' && !isset($aResult['address']['city'])) { - $aResult['address'] = array_merge(array('city' => array_shift(array_values($aResult['address']))), $aResult['address']); + $aResult['address'] = array_merge(array('city' => array_values($aResult['address'])[0]), $aResult['address']); } }