Skip to content

Commit

Permalink
Merge pull request #12 from acseo/fix-missing-tests-for-php-8-array-a…
Browse files Browse the repository at this point in the history
…ccess

Fix another missing tests for PHP8 array access
  • Loading branch information
romainguerrero authored Oct 16, 2023
2 parents 2384838 + 372566b commit 97eec87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Form/Field/FieldBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function alterDataPreSetDataEvent($formFields, $builder)
}
}
}
} elseif ("date" == $field->type && array_key_exists($name, $formData)) {
} elseif ("date" == $field->type && isset($formData[$name]['date'])) {
$dateTimeValue = \DateTime::createFromFormat('Y-m-d H:i:s.u', $formData[$name]['date']);
// try to get the date without milliseconds
if (!$dateTimeValue) {
Expand Down

0 comments on commit 97eec87

Please sign in to comment.