Merge pull request #7939 from lekoala/patch-9

Ensure tmpData exists
This commit is contained in:
Damian Mooyman 2018-03-16 10:03:59 +13:00 committed by GitHub
commit 548e9358b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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