ZF-8622: Zend_Form_Element::setDecorators() can't set what getDecorators() returned
Description
If I do:
$dec = $this->getDecorators(); $this->setDecorators($dec); $dec2 = $this->getDecorators();
var_dump($dec); echo "--------"; var_dump($dec2);
I loose a decorator (see attachment)
Comments
Posted by Francesco M. (fmntf) on 2009-12-23T14:50:37.000+0000
created controller action testcase
Posted by Francesco M. (fmntf) on 2010-01-02T16:30:40.000+0000
anyone here?
Posted by Dolf Schimmel (Freeaqingme) (freak) on 2010-01-02T16:37:58.000+0000
Please note that it's been holidays for a lot of people the past few weeks, meaning that they either did not work, or worked less. Besides that, unfortunately this issue isn't the only issue out there :'(
If you don't feel like waiting, you could create a patch, preferably with unittests. By doing so, you greatly improve the chances of getting it fixed soon.
Posted by Francesco M. (fmntf) on 2010-01-03T04:56:51.000+0000
Sorry but how could I create a patch for this if I didn't even get a response like "I confirm it's a bug"?
Posted by Matthew Weier O'Phinney (matthew) on 2010-01-03T12:22:16.000+0000
@Francesco: create a reproduce case, and document expected and actual results. Ideally, capture the reproduce case as a unit test.
Posted by Francesco M. (fmntf) on 2010-01-04T05:53:01.000+0000
Mattew: I created a reproduce case. It's attached as 'testcase.php'.
What I need to do is get element decorators and set what i got. The wrong result is that if you get decorators again, you read something different. Actual results are in 'decorators.html', where I dumped what I expected and what I got.
Posted by Christian Albrecht (alab) on 2010-03-16T04:22:14.000+0000
Posted by Christian Albrecht (alab) on 2010-03-16T05:29:23.000+0000
But my last solution could lead to problems when calling addDecorators multiple times with nonassociative arrays, so
Posted by Christian Albrecht (alab) on 2010-06-19T10:44:24.000+0000
Fixed in r22464 and merged into 1.10 release branch