From aae90ea5cb079b0c36ebadecdccad9b868193597 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 21 Sep 2014 22:44:06 +0200 Subject: [PATCH] fix adding of spaces in GB postcode Based on https://github.com/twain47/Nominatim/pull/180 by arunkmp. --- lib/Geocode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Geocode.php b/lib/Geocode.php index 0b3bd51f..c8cc4c4a 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -733,7 +733,7 @@ { if (substr($aData[1],-2,1) != ' ') { - $aData[0] = substr($aData[0],0,strlen($aData[1]-1)).' '.substr($aData[0],strlen($aData[1]-1)); + $aData[0] = substr($aData[0],0,strlen($aData[1])-1).' '.substr($aData[0],strlen($aData[1])-1); $aData[1] = substr($aData[1],0,-1).' '.substr($aData[1],-1,1); } $aGBPostcodeLocation = gbPostcodeCalculate($aData[0], $aData[1], $aData[2], $this->oDB); -- 2.45.2