Merge pull request #1051 from uniun/patch-3

BUG removeRequiredField() should use array_splice() instead of unset()
This commit is contained in:
Ingo Schommer 2013-01-11 06:45:35 -08:00
commit 42a73715cf

View File

@ -119,9 +119,9 @@ class RequiredFields extends Validator {
}
public function removeRequiredField($field) {
for($i=0; $i<count($this->required); $i++) {
if($field == $this->required[$i]) {
unset($this->required[$i]);
foreach ($this->required as $i => $required) {
if ($field == $required) {
array_splice($this->required, $i);
}
}
}