Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Hotfix/additional form options error case #7309

Conversation

carnage
Copy link
Contributor

@carnage carnage commented Mar 11, 2015

Reopened #7131 against develop

@@ -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']);
Copy link
Member

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']);
}

??

Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for explanation @weierophinney :)

@weierophinney weierophinney added this to the 2.4.0 milestone Mar 17, 2015
@weierophinney weierophinney merged commit 88a0d12 into zendframework:develop Mar 17, 2015
weierophinney added a commit that referenced this pull request Mar 17, 2015
…error-case

Hotfix/additional form options error case
weierophinney added a commit that referenced this pull request Mar 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants