Skip to content

Commit

Permalink
make sure a missing validation rule always triggers a warning (in pro…
Browse files Browse the repository at this point in the history
…ductive mode this will be logged in the log files)
  • Loading branch information
euromark committed Jul 17, 2012
1 parent 70ac1c7 commit 760cf33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Validator/CakeValidationRule.php
Expand Up @@ -274,7 +274,7 @@ public function process($field, &$data, &$methods) {
$this->_valid = call_user_func_array(array('Validation', $this->_rule), $this->_ruleParams);
} elseif (is_string($validator['rule'])) {
$this->_valid = preg_match($this->_rule, $data[$field]);
} elseif (Configure::read('debug') > 0) {
} else {
trigger_error(__d('cake_dev', 'Could not find validation handler %s for %s', $this->_rule, $field), E_USER_WARNING);
return false;
}
Expand Down

0 comments on commit 760cf33

Please sign in to comment.