This is a clone of the pull request I created in the official GeoPHP repository on Github: https://github.com/phayes/geoPHP/pull/115
It began in this issue: https://github.com/phayes/geoPHP/issues/114
I will put together a patch that includes these changes in the GeoPHP Drupal module, so that I can include it in my makefile. Ultimately, if the pull request is merged in, then we can simply update the GeoPHP library code in this module and it will accomplish the same goal. So don't worry about reviewing this patch (I just need it for Drush make) - but instead you can focus on reviewing the pull request on Github. :-)
Comment | File | Size | Author |
---|---|---|---|
#5 | geophp_bcmath-2625348-5.patch | 9.53 KB | m.stenta |
#2 | geophp_bcmath-2625348-1.patch | 9.91 KB | m.stenta |
Comments
Comment #2
m.stentaPatch attached! Setting this to Needs Review - but really the pull request is what needs review: https://github.com/phayes/geoPHP/pull/115
This patch is just a copy of that pull request.
Comment #3
m.stentaComment #4
m.stentaComment #5
m.stentaA bug was discovered with this patch that affects PHP 7.2+. See #3050510: Error: Call to a member function getY() on null in Polygon->area().
I fixed the bug in the upstream pull request, and also removed the code that sets
bcscale(24)
globally, which is only necessary in cases where the area/length of small latitude/longitude geometries are being calculated (originally described here: https://github.com/phayes/geoPHP/issues/114#issuecomment-160463523). See my latest comment on the upstream GeoPHP issue here: https://github.com/phayes/geoPHP/issues/114#issuecomment-569951690, and the upstream pull request here: https://github.com/phayes/geoPHP/pull/115Attached is an updated patch that reflects these changes.