Closed
Description
rdp_simplify method segfaults when passing GeoJSON data as an array (returns NULL if object or a string). This works if you just pass the coordinate array, but this isn't as described in the documentation.
To recreate:
$geojson = json_decode('{"type":"LineString","coordinates":[[0,0],[1,0],[2,0],[2,1],[2,2],[1,2],[0,2],[0,1],[0,0]]}', true);
var_dump(rdp_simplify($geojson, 1)); //segfault
var_dump(rdp_simplify($geojson['coordinates'], 1)); //works