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