Browse Source

[RELEASE] backport r22285 to trunk

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22290 44c647ce-9c0f-0410-b52a-842ac1e357ba
matthew 15 years ago
parent
commit
525294e3f5

+ 1 - 1
library/Zend/View/Helper/FormButton.php

@@ -56,7 +56,7 @@ class Zend_View_Helper_FormButton extends Zend_View_Helper_FormElement
     public function formButton($name, $value = null, $attribs = null)
     {
         $info    = $this->_getInfo($name, $value, $attribs);
-        extract($info); // name, id, value, attribs, options, listsep, disable
+        extract($info); // name, id, value, attribs, options, listsep, disable, escape
 
         // Get content
         $content = '';

+ 6 - 0
library/Zend/View/Helper/FormElement.php

@@ -114,6 +114,12 @@ abstract class Zend_View_Helper_FormElement extends Zend_View_Helper_HtmlElement
                     $info[$key] = $name[$key];
                 }
             }
+
+            // If all helper options are passed as an array, attribs may have 
+            // been as well
+            if (null === $attribs) {
+                $attribs = $info['attribs'];
+            }
         }
 
         $attribs = (array)$attribs;

+ 1 - 1
library/Zend/View/Helper/FormLabel.php

@@ -42,7 +42,7 @@ class Zend_View_Helper_FormLabel extends Zend_View_Helper_FormElement
      * @param  array $attribs Form element attributes (used to determine if disabled)
      * @return string The element XHTML.
      */
-    public function formLabel($name, $value = null, array $attribs = array())
+    public function formLabel($name, $value = null, array $attribs = null)
     {
         $info = $this->_getInfo($name, $value, $attribs);
         extract($info); // name, value, attribs, options, listsep, disable, escape