I am receiving the error "TypeError: Argument 1 passed to Drupal\geocoder\Geocoder::reverse() must be an instance of double, float given, called in " and believe it has something to do with #2831732: Code Standards. Just wondering why double was chosen and not float?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2847892-geocoder-remove-reverse-hints.patch | 1.41 KB | ahebrank |
| #2 | TypeError_must_be_an_instance_of_double_float_given-2847892.patch | 1.45 KB | Gravypower |
Comments
Comment #2
Gravypower commentedAdded in patch that changes the type to float so I can patch this module in my build.
Comment #3
Gravypower commentedSo this may only be an issue with PHP 7, looking into this more now.
Comment #4
Gravypower commentedSo this was an issue when using PHP 7
Comment #5
yoran scholiers commentedHad the same issue when trying to implement the Reverse method.
Also using PHP7. The patch above allows me to continue.
Comment #6
ahebrank commentedIt may be better to remove the type hints entirely since the underlying dependency doesn't have them: https://github.com/geocoder-php/Geocoder/blob/master/src/Geocoder.php#L42
Comment #7
itamair commentedThis patch seems to be essential to implement reverse geocoding in PHP 7,
thus (IMHO) should be committed ASAP and a new version of Geocoder released with it
Comment #9
polThanks, it's fixed.