-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Hotfix/additional form options error case #7309
Hotfix/additional form options error case #7309
Conversation
@@ -163,6 +163,11 @@ public function handleComposedObjectAnnotation($e) | |||
$specification['type'] = 'Zend\Form\Fieldset'; | |||
} | |||
|
|||
if (isset($elementSpec['spec']['options'])) { | |||
$specification['options'] = isset($specification['options']) ? $specification['options'] : array(); | |||
$specification['options'] = array_merge($elementSpec['spec']['options'], $specification['options']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't be
if (isset($elementSpec['spec']['options']) && isset($specification['options'])) {
$specification['options'] = array_merge($elementSpec['spec']['options'], $specification['options']);
}
??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@malukenho Good point; I'll take care of that on merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, @malukenho, it's correct as specified; we're trying to set the $specification['options']
and/or update it; if the conditional is changed as you specify, $specification['options']
will be empty later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explanation @weierophinney :)
…error-case Hotfix/additional form options error case
Reopened #7131 against develop