From e3cbea8e7933ea20594dcbbce5c306f2c94e1f78 Mon Sep 17 00:00:00 2001 From: Tam Date: Thu, 30 Nov 2017 17:50:11 +0000 Subject: [PATCH] Fixed bug where maps were failing to save --- CHANGELOG.md | 4 ++++ composer.json | 2 +- src/services/MapService.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5e3e28..694d35a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.1.1 - 2017-11-30 +### Fixed +- Fixed bug where maps were failing to save. + ## 3.1.0 - 2017-11-30 ### Added - [CraftQL](https://github.com/markhuot/craftql) support! diff --git a/composer.json b/composer.json index 914d887..7500203 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "ether/simplemap", "description": "A beautifully simple Google Map field type.", - "version": "3.1.0", + "version": "3.1.1", "type": "craft-plugin", "license": "MIT", "minimum-stability": "dev", diff --git a/src/services/MapService.php b/src/services/MapService.php index ae09cca..2e4ba46 100644 --- a/src/services/MapService.php +++ b/src/services/MapService.php @@ -468,7 +468,7 @@ private function _calculateDistance (Map $map) */ private function _padParts (Map $model) { - $parts = $model->parts; + $parts = $model->parts ?: []; foreach (self::$parts as $part) { if (!array_key_exists($part, $parts)) {