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

Commit

Permalink
Merge pull request zendframework/zendframework#2119 from weierophinne…
Browse files Browse the repository at this point in the history
…y/hotfix/zf2-440

Hotfix/zf2 440
  • Loading branch information
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/BaseInputFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,12 @@ public function isValid()
$valid = true;

$inputs = $this->validationGroup ?: array_keys($this->inputs);
//var_dump($inputs);
foreach ($inputs as $name) {
$input = $this->inputs[$name];
if (!array_key_exists($name, $this->data) || (is_string($this->data[$name]) && strlen($this->data[$name]) === 0)) {
if (!array_key_exists($name, $this->data)
|| (null === $this->data[$name])
|| (is_string($this->data[$name]) && strlen($this->data[$name]) === 0)
) {
if($input instanceof InputInterface) {
// - test if input is required
if (!$input->isRequired()) {
Expand Down

0 comments on commit 0cebe75

Please sign in to comment.