X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b14ce959d9532f192b748b12f6c71f23a9c1a60b..5e477e3b5b99da6fc4e54749d4671a6fc8fdcd66:/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; }