Skip to content

Commit a35b92a

Browse files
authored
Merge pull request #3 from romainguerrero/master
Debug array key not exist error in case of date at first level
2 parents 2464e6b + 95ab786 commit a35b92a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Form/Field/FieldBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function alterDataPreSetDataEvent($formFields, $builder)
132132
}
133133
}
134134
}
135-
} elseif ("date" == $field->type) {
135+
} elseif ("date" == $field->type && array_key_exists($name, $formData)) {
136136
$dateTimeValue = \DateTime::createFromFormat('Y-m-d H:i:s.u', $formData[$name]['date']);
137137
// try to get the date without milliseconds
138138
if (!$dateTimeValue) {

0 commit comments

Comments
 (0)