Closed pixelmatseriks closed 6 years ago
Can you please explain what kind of issue your both changes are solving? 1) I don't understand the comparization to the string "null" 2) It seems that this is a bugfix. Please explain how to reproduce this bug.
I was checking why no ipAddress was fetched, and debugged condition $ipAddress === null. The condition wasn't true even though output of $ipAddress was null. Output of gettype($ipAddress) showed string instead of NULL. The condition $ipAddress == 'null' matches the null as string. (TYPO3 8, PHP 7.0.22-0ubuntu0.16.04.1)
When ipApiKey is added in extension manager settings, the url to ipapi should be: https://ipapi.co/ipaddress/json/?key=someapikeyfromextsettings instead of just https://ipapi.co/ipaddress/json/. It works without this commit if the part ?key= is included in extension manager settings, but with this change it will work also if the ?key= part isn't included.
2) Ok seems that this is an improvement - I'm going to accept this. Nevertheless can you please change your PR to only change the $key? After that I will merge it.
Thx for the time that you spent into that issue.
Thx, I will close this one. See other PR https://github.com/einpraegsam/ipandlanguageredirect/pull/7 BTW: I released a new version what fixes the "null" issue yesterday
Great thanks :) :+1: (made a new PR instead of changing this, I still use the fork temporary in a project.)
[TASK] also set ipAddress when it is 'null' (string) [TASK] make sure '?key=' is added to IpApi key