From b799200a6a14bbb5c3e095c3a734e79cd18f2bdd Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Thu, 29 Aug 2024 18:46:56 +1000 Subject: [PATCH 1/3] Fix an error when parsing variable tokens --- src/helpers/Variables.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/Variables.php b/src/helpers/Variables.php index 27d077cd..9183a176 100644 --- a/src/helpers/Variables.php +++ b/src/helpers/Variables.php @@ -185,9 +185,9 @@ public static function getParsedValue(mixed $value, Submission $submission = nul // This helps to only cache it per-submission, when being run in queues. $cacheKey = mt_rand(); - if ($submission->id) { + if ($submission && $submission->id) { $cacheKey = 'submission' . $submission->id; - } else if ($form->id) { + } else if ($form && $form->id) { $cacheKey = 'form' . $form->id; } From e5d9584453d71a2a8fef4e11bff1f3c9dff37879 Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Thu, 29 Aug 2024 18:47:59 +1000 Subject: [PATCH 2/3] version 2.1.28 --- CHANGELOG.md | 7 ++++++- composer.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d899d63..eecdb8c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog -## 2.1.27 - 2024-08-14 +## 2.1.28 - 2024-08-29 + +### Fixed +- Fix an error when parsing variable tokens. + +## 2.1.27 - 2024-08-29 ### Added - Added “Page URI” and “Page Name” to HubSpot integration for Forms. diff --git a/composer.json b/composer.json index 77e26ac0..4eec0a27 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "verbb/formie", "description": "The most user-friendly forms plugin for Craft.", "type": "craft-plugin", - "version": "2.1.27", + "version": "2.1.28", "keywords": [ "craft", "cms", From f2b71c9155dde5e0bc2c8e3233e912fc30aff7e4 Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Thu, 29 Aug 2024 18:48:18 +1000 Subject: [PATCH 3/3] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eecdb8c3..c4feccc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## 2.1.28 - 2024-08-29 ### Fixed -- Fix an error when parsing variable tokens. +- Fixed an error when parsing variable tokens. ## 2.1.27 - 2024-08-29