[FORM] Fix bug where options were passed in the data parameter
This commit is contained in:
parent
1419035076
commit
ebee70621b
@ -85,10 +85,10 @@ abstract class Form
|
||||
?object $target = null,
|
||||
array $extra_data = [],
|
||||
string $type = 'Symfony\Component\Form\Extension\Core\Type\FormType',
|
||||
array $builder_options = []): SymfForm
|
||||
array $form_options = []): SymfForm
|
||||
{
|
||||
$name = $form[array_key_last($form)][0];
|
||||
$fb = self::$form_factory->createNamedBuilder($name, $type, array_merge($builder_options, ['translation_domain' => false]));
|
||||
$fb = self::$form_factory->createNamedBuilder($name, $type, data: null, options: array_merge($form_options, ['translation_domain' => false]));
|
||||
foreach ($form as [$key, $class, $options]) {
|
||||
if ($target != null && empty($options['data']) && (strstr($key, 'password') == false) && $class != SubmitType::class) {
|
||||
if (isset($extra_data[$key])) {
|
||||
|
Loading…
Reference in New Issue
Block a user