Skip to content

Commit

Permalink
Merge pull request bozdoz#207 from bozdoz/fix-203
Browse files Browse the repository at this point in the history
checks that geocoder has a lng/lat before setting; resolves bozdoz#203
  • Loading branch information
hupe13 authored Feb 10, 2023
2 parents 93bb4d9 + e3bd2c5 commit c5ab146
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions class.geocoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ public function __construct ($address) {
}
}

// set variables
$this->lat = $location->lat;
$this->lng = $location->lng;
if (isset($location->lat) && isset($location->lng)) {
$this->lat = $location->lat;
$this->lng = $location->lng;
}
}

/**
Expand Down

0 comments on commit c5ab146

Please sign in to comment.