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

Check urlStoreId as integer #25

Merged
merged 1 commit into from
Jan 15, 2024
Merged

Check urlStoreId as integer #25

merged 1 commit into from
Jan 15, 2024

Conversation

barryvdh
Copy link
Contributor

@barryvdh barryvdh commented Jan 4, 2024

It seems that the $urlStoreId is returned as a string (so "2"). The curStoreId is cast as int and it is a strict comparison, so it fails.
The result can also be false, so I added a check for that case. Otherwise we also cast it as an int.

This fixes #19, as it marks the url incorrectly as not being internal, which make the 'backUrl' revert to the current store url (the homepage).

Fixes types for urlStoreId. Fixes ho-nl#19
@hnsr hnsr merged commit be5cd43 into ho-nl:master Jan 15, 2024
1 check passed
@hnsr
Copy link
Contributor

hnsr commented Jan 15, 2024

Merged, thanks @barryvdh ! Will tag a new version for this.

@barryvdh barryvdh deleted the patch-4 branch January 15, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removing item from shopping cart on cart page redirects 302 to homepage
2 participants