Skip to content

Commit

Permalink
If a user tries to load a geometry from a geometry, just pass it back
Browse files Browse the repository at this point in the history
  • Loading branch information
phayes committed Sep 3, 2012
1 parent 517f7db commit f5ca264
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions geoPHP.inc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ class geoPHP

// Auto-detect type if needed
if (!$type) {
if (is_a($data, 'Geometry')) {
// User is trying to load a Geometry from a Geometry... Just pass it back
return $data;
}
$type = geoPHP::detectFormat($data);
}

Expand Down

0 comments on commit f5ca264

Please sign in to comment.