diff --git a/CHANGELOG.md b/CHANGELOG.md index fb662ee..0905d02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 1.4.0.1 - 2022-04-05 + +### Fixed +- Fixes a regression error that could cause a PHP exception in element edit pages on multi-site installs + ## 1.4.0 - 2022-04-05 ### Fixed diff --git a/composer.json b/composer.json index c073274..51b3465 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "mmikkel/cp-field-inspect", "description": "Inspect field handles and easily edit field and element source settings", "type": "craft-plugin", - "version": "1.4.0", + "version": "1.4.0.1", "keywords": [ "craft", "cms", diff --git a/src/services/Redirect.php b/src/services/Redirect.php index cdd1add..0894ed4 100644 --- a/src/services/Redirect.php +++ b/src/services/Redirect.php @@ -26,7 +26,7 @@ public function getRedirectUrl(?string $url = null): string } // Special case for globals – account for their handles being edited before redirecting back $segments = \explode('/', $url); - if ($segments[0] ?? null === 'globals') { + if (($segments[0] ?? null) === 'globals') { if (Craft::$app->getIsMultiSite()) { $siteHandle = $segments[1] ?? null; $globalSetHandle = $segments[2] ?? null;