stefanzweifel/php-swiss-cantons

Throws exception if passed zipcode is not an integer

stefanzweifel opened this issue · 0 comments

1. What's your issue?

Package throws an error if zipcode was provided as string instead of an integer.

2. Which PHP Version are you using?

I'm using PHP Version 7.0.

3. Which Version of the php-swiss-cantons Package are you using?

I'm using version 1.2.0.

4. In which context are you using the package? (Code Example goes here)

$canton = $cantonManager->getByZipcode('8000');

// Workaround:
$canton = $cantonManager->getByZipcode(intval('8000'));

5. What did you expect to happen in the first place?

Don't throw an exception :)