Fix PHP 8.1 compatibility
chfoidl opened this issue · 2 comments
chfoidl commented
When using this library with PHP 8.1, a deprecation warning is triggered: fwrite(): Passing null to parameter #2 ($data) of type string is deprecated
This can easily be fixed by type casting the $input
variable to string.
See this PR #191
itamair commented
FYI ... as this Github repo looks abandoned, and this issue would also be blocking Drupal Geofield module with PHP 8.1 (https://www.drupal.org/project/geofield/issues/3294152) I solved this (applying the corresponding PR#191)
in this new fork: https://github.com/itamair/geoPHP
(Packagist: https://packagist.org/packages/itamair/geophp)
BathoryPeter commented
Or take a look at my fork: https://github.com/funiq/geoPHP