소스 검색

[RELEASE] backport r22285 to trunk

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22290 44c647ce-9c0f-0410-b52a-842ac1e357ba
matthew 15 년 전
부모
커밋
525294e3f5
3개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      library/Zend/View/Helper/FormButton.php
  2. 6 0
      library/Zend/View/Helper/FormElement.php
  3. 1 1
      library/Zend/View/Helper/FormLabel.php

+ 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)
     public function formButton($name, $value = null, $attribs = null)
     {
     {
         $info    = $this->_getInfo($name, $value, $attribs);
         $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
         // Get content
         $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];
                     $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;
         $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)
      * @param  array $attribs Form element attributes (used to determine if disabled)
      * @return string The element XHTML.
      * @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);
         $info = $this->_getInfo($name, $value, $attribs);
         extract($info); // name, value, attribs, options, listsep, disable, escape
         extract($info); // name, value, attribs, options, listsep, disable, escape