From 2e1c70b56cee048e7cfa36b9e047d489bdea1584 Mon Sep 17 00:00:00 2001 From: Thomas Portelange Date: Thu, 15 Mar 2018 20:40:05 +0100 Subject: [PATCH] Ensure tmpData exists Otherwise you might get illegal string offset --- src/Forms/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Forms/Form.php b/src/Forms/Form.php index 9acef4df5..34b1b0792 100644 --- a/src/Forms/Form.php +++ b/src/Forms/Form.php @@ -1454,7 +1454,7 @@ class Form extends ViewableData implements HasRequestHandler $tmpData = &$data[$name]; // drill down into the data array looking for the corresponding value foreach ($keys as $arrayKey) { - if ($arrayKey !== '') { + if ($tmpData && $arrayKey !== '') { $tmpData = &$tmpData[$arrayKey]; } else { //empty square brackets means new array