Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address::getTokens passing invalid subdivision value on line 206 #1780

Closed
fredbliss opened this issue Feb 25, 2017 · 3 comments
Closed

Address::getTokens passing invalid subdivision value on line 206 #1780

fredbliss opened this issue Feb 25, 2017 · 3 comments
Labels
Milestone

Comments

@fredbliss
Copy link

fredbliss commented Feb 25, 2017

During Checkout, we get an exception that I have traced back to Address::getTokens()

At line 206, the call made is thus:

Backend::getLabelForSubdivision($country, $subdivision);

Which results in an invalid argument for foreach() error in Backend::getLabelForSubdivision() on line 107. The argument $subdivision is passed as "MA" instead of "US-MA" and the key therefore is not found in the subdivisions language array.

Fix achieved by changing line 206 to this:

Backend::getLabelForSubdivision($country, $this->subdivision);

@fredbliss fredbliss changed the title Address::getTokens sending invalid subdivision on line 206 Backend::getLabelForSubdivision() Address::getTokens sending invalid subdivision value on line 206 Backend::getLabelForSubdivision() Feb 25, 2017
@fredbliss fredbliss changed the title Address::getTokens sending invalid subdivision value on line 206 Backend::getLabelForSubdivision() Address::getTokens sending invalid subdivision value on line 206 Feb 25, 2017
@fredbliss fredbliss changed the title Address::getTokens sending invalid subdivision value on line 206 Address::getTokens passing invalid subdivision value on line 206 Feb 25, 2017
@rburch
Copy link

rburch commented Feb 27, 2017

I'm getting the same error too. I updated \modules\isotope\library\Isotope\Model\Address.php with your change, but it didn't fix it for me.

@aschempp aschempp added the bug label Feb 28, 2017
@aschempp aschempp added this to the 2.4.1 milestone Feb 28, 2017
@fredbliss
Copy link
Author

To further elaborate, I suspect this function is called in multiple places because this fix only worked for me when logged in as a member, checking out. Bob still sees it in guest checkout mode and in the backend, so it must be called in other places in the same way.

@aschempp
Copy link
Member

aschempp commented Mar 6, 2017

Fixed in e0fce02

@aschempp aschempp closed this as completed Mar 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants