Skip to content

Commit

Permalink
Merge pull request #1 from DieterHolvoet/issue/parse-point-warning
Browse files Browse the repository at this point in the history
Fix 'Warning: Undefined array key 1 in WKT->parsePoint()'
  • Loading branch information
itamair authored Feb 4, 2023
2 parents d7bccf9 + c9f069c commit 12cd124
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/adapters/WKT.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ private function parsePoint($data_string) {
if ($data_string == 'EMPTY') return new Point();

$parts = explode(' ',$data_string);
if (!isset($parts[0]) || !isset($parts[1])) {
return new Point();
}

return new Point($parts[0], $parts[1]);
}

Expand Down

0 comments on commit 12cd124

Please sign in to comment.