-
Notifications
You must be signed in to change notification settings - Fork 72
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
Fix ContextErrorException due to long2ip() #71
Conversation
Fix https://github.com/PrestaShop/psgdpr/issues/61 long2ip() expects parameter 1 to be integer, string given
ip_addres column is varchar 16, only ipv4
😐 Maybe I should open an issue to propose changing this. In my database I only see that it stores the ip as long |
I think there are some issues with the |
Although the column is varchar, the model class validates the content with the isIp2Long function, so the content is a number
Updated: |
Co-Authored-By: GoT <PierreRambaud@users.noreply.github.com>
Thank you for the PR. Can you give us a test case ? |
This is required since a change on PHP long2ip : https://www.php.net/manual/en/function.long2ip.php
To reproduce, you should have PHP 7.1 or higher and debug mode activated on PrestaShop |
Thanks @davidglezz |
Fix https://github.com/PrestaShop/psgdpr/issues/61
long2ip() expects parameter 1 to be integer, string given