瀏覽代碼

Fixes #595 - Zend_Form: Removing annoying warning.

Closes #596
frank 10 年之前
父節點
當前提交
c25909f33b
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);
             }