From 1cab0fb9abf780eb265598366ca8ed64ea4b0467 Mon Sep 17 00:00:00 2001 From: "Mr. Lewis" Date: Mon, 10 Sep 2018 11:15:27 +0200 Subject: [PATCH 1/2] [BUGFIX] Solved Missing Configuration because of Illegal string offset 'value' --- Helper/Data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Helper/Data.php b/Helper/Data.php index 4814772..9f767db 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -114,7 +114,7 @@ public function getConfigDisplayValue($path, $contextScope, $contextScopeId) { $optionsByValue = []; foreach($field->getOptions() as $option) { - $optionsByValue[$option['value']] = $option; + @$optionsByValue[$option['value']] = $option; } $values = explode(',', $value); From da5829aaa70d21336974041daddb066ea70c2bcf Mon Sep 17 00:00:00 2001 From: Lewis Voncken Date: Sat, 7 Mar 2020 23:25:38 +0100 Subject: [PATCH 2/2] [REFACTOR] Added if statement instead of error suppression --- Helper/Data.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Helper/Data.php b/Helper/Data.php index 9f767db..60ff249 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -114,7 +114,9 @@ public function getConfigDisplayValue($path, $contextScope, $contextScopeId) { $optionsByValue = []; foreach($field->getOptions() as $option) { - @$optionsByValue[$option['value']] = $option; + if (isset($option['value'])) { + $optionsByValue[$option['value']] = $option; + } } $values = explode(',', $value);