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

Update IpInfoDb.php #1095

Closed
wants to merge 1 commit into from
Closed

Update IpInfoDb.php #1095

wants to merge 1 commit into from

Conversation

rtiagom
Copy link
Contributor

@rtiagom rtiagom commented Nov 29, 2020

Patch to prevent "Uncaught TypeError: Argument 11 passed to Geocoder\Model\Address".

Patch to prevent "Uncaught TypeError: Argument 11 passed to Geocoder\Model\Address".
Copy link
Member

@jbelien jbelien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is the best way to tackle this issue.
I would prefer to process correctly the timezone in every cases!

Could you also add a test with an IP in Australia ?

Thanks!

@rtiagom
Copy link
Contributor Author

rtiagom commented Nov 29, 2020

I agree that this is not the best way to handle this issue but I don't have the time to work on a proper fix right now. At least the patch makes everything work with Geocoder\Model\Address.

@rtiagom
Copy link
Contributor Author

rtiagom commented Nov 29, 2020

Regarding the test IP, remember that the reason an Australian IP fails right now is because of daylight saving time and that changes in a few months which would make the test inconclusive.

I would recommend applying the current patch right now and open a ticket to find an alternative to timezone_name_from_abbr later on.

@jbelien
Copy link
Member

jbelien commented Nov 29, 2020

At least the patch makes everything work with Geocoder\Model\Address.

I would recommend applying the current patch right now and open a ticket to find an alternative to timezone_name_from_abbr later on.

I don't really consider "hiding" the error to be a patch.

Regarding the test IP, remember that the reason an Australian IP fails right now is because of daylight saving time and that changes in a few months which would make the test inconclusive.

We store/cache the API response, the test will be the same at anytime.

@rtiagom
Copy link
Contributor Author

rtiagom commented Nov 29, 2020

I don't really consider "hiding" the error to be a patch.

Ok, fair enough. In our current project we have no use for the Address timezone field so it doesn't matter what it returns as long it doesn't break which this patch handles it. Feel free to reject the PR.

@jbelien jbelien closed this Jul 30, 2022
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.

IpInfoDb - Uncaught TypeError: Argument 11 passed to Geocoder\Model\Address
2 participants