diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c6e146..1d57568 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.8.1 - 2023-01-19 +### Fixed +- PHP TypeError when no coordinates are set. + ## 1.8.0 - 2022-10-27 ### Added - Improved support with [Location hierarchy](https://www.itophub.io/wiki/page?id=extensions:combodo-location-hierarchy) extension. diff --git a/main.sv-geolocation.php b/main.sv-geolocation.php index 9dd2a0f..6ee22c1 100644 --- a/main.sv-geolocation.php +++ b/main.sv-geolocation.php @@ -75,7 +75,7 @@ public function GetSQLValues($value) } /** - * @param string|ormGeolocation $proposedValue + * @param null|string|ormGeolocation $proposedValue * @param DBObject $oHostObj * @return ormGeolocation */ @@ -371,7 +371,7 @@ public static function getRijksdriehoekReference() * @param string $sInput * @return static */ - public static function fromString(string $sInput) + public static function fromString(?string $sInput) { if (preg_match('{^([-+]?(?:[1-8]?\d(?:\.\d+)?|90(?:\.0+)?)),\s*([-+]?(?:180(?:\.0+)?|(?:(?:1[0-7]\d)|(?:[1-9]?\d))(?:\.\d+)?))$}', trim($sInput), $aMatches)) { diff --git a/module.sv-geolocation.php b/module.sv-geolocation.php index 0d2d56f..3559762 100755 --- a/module.sv-geolocation.php +++ b/module.sv-geolocation.php @@ -5,7 +5,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'sv-geolocation/1.8.0', + 'sv-geolocation/1.8.1', array( // Identification //