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

Commit

Permalink
Merge pull request #7003 from gabrielsch/bugfix/input-not-empty
Browse files Browse the repository at this point in the history
Fixing prepended `NotEmpty` validator
  • Loading branch information
weierophinney committed Mar 10, 2015
2 parents 626e2a5 + 2330be1 commit 66af8c7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion library/Zend/InputFilter/Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,14 @@ protected function injectNotEmptyValidator()
}
}

$chain->prependByName('NotEmpty', array(), true);
$this->notEmptyValidator = true;

if (class_exists('Zend\ServiceManager\AbstractPluginManager')) {
$chain->prependByName('NotEmpty', array(), true);

return;
}

$chain->prependValidator(new NotEmpty(), true);
}
}

0 comments on commit 66af8c7

Please # to comment.