From 26716b705addd0263c0a6aad0fa7b9e3fb7aafa4 Mon Sep 17 00:00:00 2001 From: steache <34166829+steache@users.noreply.github.com> Date: Fri, 17 Aug 2018 14:35:30 +0200 Subject: [PATCH] fixing negative coordinates --- src/Kdyby/Doctrine/Geo/Element.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Kdyby/Doctrine/Geo/Element.php b/src/Kdyby/Doctrine/Geo/Element.php index c7625be8..2b1dd987 100644 --- a/src/Kdyby/Doctrine/Geo/Element.php +++ b/src/Kdyby/Doctrine/Geo/Element.php @@ -244,7 +244,7 @@ protected function init() $separator = $this->separator; $coordsSeparator = $this->coordsSeparator; - $coordsRegexp = '~^\s*[\d\.]+\s*' . preg_quote($coordsSeparator) . '\s*[\d\.]+\s*$~i'; + $coordsRegexp = '~^\s*-?[\d\.]+\s*' . preg_quote($coordsSeparator) . '\s*-?[\d\.]+\s*$~i'; $coordinates = []; foreach (explode($separator, $coordsList) as $coords) {