Skip to content

Commit

Permalink
Fix PHP exception
Browse files Browse the repository at this point in the history
  • Loading branch information
mmikkel committed Apr 5, 2022
1 parent 22cbce1 commit 8a17e16
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/services/Redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8a17e16

Please sign in to comment.