Skip to content

Commit

Permalink
Merge pull request #328 from steache/fix-negative-coordinates
Browse files Browse the repository at this point in the history
fixing negative coordinates
  • Loading branch information
enumag committed Aug 18, 2018
2 parents 95f6e35 + 26716b7 commit 777cbeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kdyby/Doctrine/Geo/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 777cbeb

Please sign in to comment.