Ver código fonte

Fixes #595 - Zend_Form: Removing annoying warning.

Closes #596
frank 10 anos atrás
pai
commit
c25909f33b
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      library/Zend/Form.php

+ 1 - 1
library/Zend/Form.php

@@ -1295,7 +1295,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
             if (($belongsTo = $element->getBelongsTo()) !== $eBelongTo) {
                 $check = $this->_dissolveArrayValue($defaults, $belongsTo);
             }
-            if (array_key_exists($name, $check)) {
+            if (array_key_exists($name, (array)$check)) {
                 $this->setDefault($name, $check[$name]);
                 $defaults = $this->_dissolveArrayUnsetKey($defaults, $belongsTo, $name);
             }