Skip to content

Commit

Permalink
Fix error message when providing an invalid longitude
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromegamez committed Jan 19, 2022
1 parent 760be90 commit 905a2b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Fixed

* Fixed error message when providing an invalid longitude

## [1.0.0] - 2022-01-19

Initial release
Expand Down
2 changes: 1 addition & 1 deletion src/Geohash.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static function encode(float $lat, float $lon, ?int $precision = null): s
}

if ($lon < $lonMin || $lon > $lonMax) {
throw new InvalidArgumentException("The longitude must be between $latMin and $latMax");
throw new InvalidArgumentException("The longitude must be between $lonMin and $lonMax");
}

if (($precision !== null) && ($precision < $precisionMin || $precision > $precisionMax)) {
Expand Down

0 comments on commit 905a2b1

Please sign in to comment.