Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/zendframework/zendframework#6505-fix-null-pointe…
Browse files Browse the repository at this point in the history
…r-in-inputfilter-factory' into develop

Forward port zendframework/zendframework#6505
  • Loading branch information
Ocramius committed Aug 6, 2014
5 parents 14ea016 + 0f3cda8 + 3b2126c + 51c8f86 + 18c51d2 commit 7431896
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,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
7 changes: 7 additions & 0 deletions test/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,13 @@ public function testSetInputFilterManagerWithoutServiceManager()
$this->assertSame($inputFilterManager, $factory->getInputFilterManager());
}

public function testSetInputFilterManagerOnConstruct()
{
$inputFilterManager = new InputFilterPluginManager();
$factory = new Factory($inputFilterManager);
$this->assertSame($inputFilterManager, $factory->getInputFilterManager());
}

/**
* @group 5691
*
Expand Down

0 comments on commit 7431896

Please sign in to comment.