Skip to content

Commit

Permalink
fix for zendframework#4365 - if constructor received InputFilterManag…
Browse files Browse the repository at this point in the history
…er via arguments, it called setInputFilterManager. setInputFilterManager assumed default filter/validator chains were initialized if serviceLocator was present, which is not the case, as defaultFilter/Validator are not set until later in the constructor.
  • Loading branch information
Dan Vande More committed Nov 20, 2013
1 parent a64a1ab commit 64878a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/Zend/InputFilter/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ class Factory
*/
public function __construct(InputFilterPluginManager $inputFilterManager = null)
{
$this->defaultFilterChain = new FilterChain();
$this->defaultValidatorChain = new ValidatorChain();

if ($inputFilterManager) {
$this->setInputFilterManager($inputFilterManager);
}

$this->defaultFilterChain = new FilterChain();
$this->defaultValidatorChain = new ValidatorChain();
}

/**
Expand Down

0 comments on commit 64878a4

Please sign in to comment.