Navigation Menu

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

getInputFilterSpecification() called twice for the same fieldset #5197

Closed
buonaparte opened this issue Sep 30, 2013 · 2 comments
Closed

getInputFilterSpecification() called twice for the same fieldset #5197

buonaparte opened this issue Sep 30, 2013 · 2 comments

Comments

@buonaparte
Copy link

Code is explained here:

http://stackoverflow.com/questions/19103039/zf2-fieldset-getinputfilterspecification-gets-called-twice

Debugging:

Zend\Form\Form Class:

line: ~769:

 if ($fieldset instanceof InputFilterProviderInterface) {
     var_dump($fieldset->getName().'1');
     foreach ($fieldset->getInputFilterSpecification() as $name => $spec) {

line ~815:

 // Create an input filter based on the specification returned from the fieldset
 var_dump($childFieldset->getName().'2');
 $spec   = $childFieldset->getInputFilterSpecification();

Output:

string(7) "reward2" string(7) "reward1"

So first the filters for RewardFieldset are loaded as being a child fieldset. And then again as being a base fieldset.

@Nowicki
Copy link

Nowicki commented Oct 1, 2013

I wrote about this few days ago #5166. There is also a simple form example.

@Maks3w
Copy link
Member

Maks3w commented Oct 21, 2013

Duplicate #5050

@Maks3w Maks3w closed this as completed Oct 21, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants