Skip to content

Commit

Permalink
Fixed isEmptyAllowed() method
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jun 21, 2014
1 parent 1490e7e commit 985d3e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Validation/Validator.php
Expand Up @@ -411,7 +411,10 @@ public function notEmpty($field, $message = null, $when = false) {
* @return bool
*/
public function isEmptyAllowed($field, $newRecord) {
return $this->_canBeEmpty($this->field($field), $newRecord);
$providers = $this->_providers;
$data = [];
$context = compact('data', 'newRecord', 'field', 'providers');
return $this->_canBeEmpty($this->field($field), $context);
}

/**
Expand Down

0 comments on commit 985d3e0

Please sign in to comment.