Skip to content

Commit

Permalink
proper behavior when passing an empty array to geometryReduce
Browse files Browse the repository at this point in the history
  • Loading branch information
phayes committed Dec 24, 2012
1 parent bc9a8b7 commit c5f8c9e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions geoPHP.inc
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ class geoPHP
static function geometryReduce($geometry) {
// If it's an array of one, then just parse the one
if (is_array($geometry)) {
if (empty($geometry)) return FALSE;
if (count($geometry) == 1) return geoPHP::geometryReduce($geometry[0]);
}

Expand Down

0 comments on commit c5f8c9e

Please sign in to comment.