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/4599' into develop
Browse files Browse the repository at this point in the history
Forward port zendframework/zendframework#4599

Conflicts:
	tests/ZendTest/InputFilter/InputTest.php
  • Loading branch information
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ public function merge(InputInterface $input)
{
$this->setAllowEmpty($input->allowEmpty());
$this->setBreakOnFailure($input->breakOnFailure());
$this->setContinueIfEmpty($input->continueIfEmpty());
$this->setErrorMessage($input->getErrorMessage());
$this->setName($input->getName());
$this->setRequired($input->isRequired());
Expand Down
10 changes: 10 additions & 0 deletions test/InputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,4 +302,14 @@ public function testFallbackValue($fallbackValue)
$this->assertEmpty($this->input->getMessages());
$this->assertSame($fallbackValue, $this->input->getValue());
}

public function testMergeRetainsContinueIfEmptyFlag()
{
$input = new Input('foo');
$input->setContinueIfEmpty(true);

$input2 = new Input('bar');
$input2->merge($input);
$this->assertTrue($input2->continueIfEmpty());
}
}

0 comments on commit 6d4c9af

Please sign in to comment.