Przeglądaj źródła

ZF-10149: Applying the rest of the patch from Richard Tuin

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23428 44c647ce-9c0f-0410-b52a-842ac1e357ba
bittarman 15 lat temu
rodzic
commit
862702985f
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      library/Zend/Form.php

+ 4 - 1
library/Zend/Form.php

@@ -354,7 +354,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
         }
 
         $forbidden = array(
-            'Options', 'Config', 'PluginLoader', 'SubForms', 'View', 'Translator',
+            'Options', 'Config', 'PluginLoader', 'SubForms', 'Translator',
             'Attrib', 'Default',
         );
 
@@ -366,6 +366,9 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
 
             $method = 'set' . $normalized;
             if (method_exists($this, $method)) {
+                if($normalized == 'View' && !($value instanceof Zend_View_Interface)) {
+                    continue;
+                }
                 $this->$method($value);
             } else {
                 $this->setAttrib($key, $value);