grimzy / laravel-mysql-spatial

MySQL Spatial Data Extension integration with Laravel.
Other
790 stars 309 forks source link

MultiPoint : return sprintf('(%s)', $point->toPair()); ------> change to : return sprintf('%s', $point->toPair()); #66

Open pburel opened 5 years ago

pburel commented 5 years ago

Because a bug saving Multi Points with 10.3.10-MariaDB - MariaDB Server on Centos7 :

I suggest removing parenthesis in MultiPoint.php around sprintf .. (%s) ... to %s

public function __toString() { return implode(',', array_map(function (Point $point) { return sprintf('(%s)', $point->toPair()); ------> change to : return sprintf('%s', $point->toPair()); }, $this->items)); }

inazioKam commented 5 years ago

There is more info about this change at MySQL website. These parenthesis are incompatible with previous MySQL versions (< 5.7.9).