X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ee32315378868748fe3704616e9ca860cdc97da9..b01a836d1ecce5c7cc1aceedf19535eeda9058af:/lib-php/TokenPostcode.php diff --git a/lib-php/TokenPostcode.php b/lib-php/TokenPostcode.php index c0b42fad..0ff92929 100644 --- a/lib-php/TokenPostcode.php +++ b/lib-php/TokenPostcode.php @@ -1,4 +1,12 @@ iId = $iId; - $this->sPostcode = $sPostcode; + $iSplitPos = strpos($sPostcode, '@'); + if ($iSplitPos === false) { + $this->sPostcode = $sPostcode; + } else { + $this->sPostcode = substr($sPostcode, 0, $iSplitPos); + } $this->sCountryCode = empty($sCountryCode) ? '' : $sCountryCode; }