From f9a0d8c40fa62cf5554850f2dfbecf62551caf2b Mon Sep 17 00:00:00 2001 From: Tam Date: Thu, 6 Sep 2018 17:34:35 +0100 Subject: [PATCH] Fixed a bug when adding a redirect to all sites --- CHANGELOG.md | 4 ++++ composer.json | 2 +- src/services/RedirectsService.php | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 197a80d..21c1f66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.4.1 - 2018-09-06 +### Fixed +- Fixed a bug when adding a redirect to all sites. + ## 3.4.0 - 2018-09-06 > {warning} This update contains some potentially breaking changes. If you use a custom `meta.twig` template you should review the changes [here](https://github.com/ethercreative/seo/commits/v3/src/templates/_seo/meta.twig). diff --git a/composer.json b/composer.json index b541c84..517566b 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "ether/seo", "license": "MIT", "description": "SEO utilities including a unique field type, sitemap, & redirect manager", - "version": "3.4.0", + "version": "3.4.1", "type": "craft-plugin", "minimum-stability": "dev", "require": { diff --git a/src/services/RedirectsService.php b/src/services/RedirectsService.php index 2e0c41b..39ef4cf 100644 --- a/src/services/RedirectsService.php +++ b/src/services/RedirectsService.php @@ -137,6 +137,9 @@ public function findRedirectByPath ($path) */ public function save ($uri, $to, $type, $siteId = null, $id = null) { + if ($siteId === 'null') + $siteId = null; + if ($id) { $record = RedirectRecord::findOne(compact('id'));