ZF-10195: Zend_Form_Element::addDecorators improves

Description

I have form xml config like this:



        
            
    

But current addDecorators do not use decorator label, from array key

this small patch fix this issue

diff -Bbu Element.php.orig Element.php
--- Element.php.orig    2010-06-19 13:41:04.000000000 +0300
+++ Element.php 2010-07-21 13:58:40.000000000 +0300
@@ -1879,7 +1879,11 @@
                     if (isset($decoratorInfo['options'])) {
                         $options = $decoratorInfo['options'];
                     }
+                                       if ( !is_numeric($decoratorName) ) {
+                                               $this->addDecorator(array($decoratorName => $decorator), $options);
+                                       }else{
                     $this->addDecorator($decorator, $options);
+                                       }
                 } else {
                     switch (true) {
                         case (0 == $argc):

Tests before patch: Tests: 830, Assertions: 2297, Incomplete: 3. Tests after patch: Tests: 830, Assertions: 2297, Incomplete: 3.

Comments

No comments to display