Skip to content

Commit

Permalink
For Validator class, merged in $_FILES array by default along with $_…
Browse files Browse the repository at this point in the history
…POST if it's not first found in the post
  • Loading branch information
David McReynolds committed Nov 6, 2014
1 parent 2d666bd commit 193643e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fuel/modules/fuel/libraries/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ public function add_rule($field, $func, $msg, $params = array())
if (empty($params))
{
if (!empty($_POST[$field])) $params = $_POST[$field];
if (empty($params[$field]) AND !empty($_FILES[$field])) $params = $_FILES[$field];
}
$rule = new Validator_Rule($func, $msg, $params);
$this->_fields[$field][] = $rule;
Expand Down

0 comments on commit 193643e

Please sign in to comment.