diff --git a/lib/CrEOF/Spatial/PHP/Types/AbstractPoint.php b/lib/CrEOF/Spatial/PHP/Types/AbstractPoint.php index cc9d6c4f..7b602540 100644 --- a/lib/CrEOF/Spatial/PHP/Types/AbstractPoint.php +++ b/lib/CrEOF/Spatial/PHP/Types/AbstractPoint.php @@ -64,7 +64,7 @@ public function __construct() */ public function setX($x) { - $parser = new Parser($x); + $parser = new Parser((string) $x); try { $this->x = (float) $parser->parse(); @@ -93,7 +93,7 @@ public function getX() */ public function setY($y) { - $parser = new Parser($y); + $parser = new Parser((string) $y); try { $this->y = (float) $parser->parse(); diff --git a/lib/CrEOF/Spatial/PHP/Types/Geography/Point.php b/lib/CrEOF/Spatial/PHP/Types/Geography/Point.php index 62b1b9d8..1cfe7214 100644 --- a/lib/CrEOF/Spatial/PHP/Types/Geography/Point.php +++ b/lib/CrEOF/Spatial/PHP/Types/Geography/Point.php @@ -45,7 +45,7 @@ class Point extends AbstractPoint implements GeographyInterface */ public function setX($x) { - $parser = new Parser($x); + $parser = new Parser((string) $x); try { $x = (float) $parser->parse(); @@ -72,7 +72,7 @@ public function setX($x) */ public function setY($y) { - $parser = new Parser($y); + $parser = new Parser((string) $y); try { $y = (float) $parser->parse();