Skip to content

Commit

Permalink
Form fix zendframework#2586 until it can be merged
Browse files Browse the repository at this point in the history
  • Loading branch information
cgmartin committed Oct 31, 2012
1 parent 1af218e commit 02f8f7a
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions library/Zend/Form/Form.php
Expand Up @@ -587,17 +587,15 @@ public function setInputFilter(InputFilterInterface $inputFilter)
*/
public function getInputFilter()
{
if (null === $this->filter) {
if ($this->object instanceof InputFilterAwareInterface) {
if (null == $this->baseFieldset) {
$this->filter = $this->object->getInputFilter();
} else {
$name = $this->baseFieldset->getName();
if (!$this->filter instanceof InputFilterInterface || !$this->filter->has($name)) {
$filter = new InputFilter();
$filter->add($this->object->getInputFilter(), $name);
$this->filter = $filter;
}
if ($this->object instanceof InputFilterAwareInterface) {
if (null == $this->baseFieldset) {
$this->filter = $this->object->getInputFilter();
} else {
$name = $this->baseFieldset->getName();
if (!$this->filter instanceof InputFilterInterface || !$this->filter->has($name)) {
$filter = new InputFilter();
$filter->add($this->object->getInputFilter(), $name);
$this->filter = $filter;
}
}
}
Expand Down

0 comments on commit 02f8f7a

Please sign in to comment.