Permalink
Browse files

make sure a missing validation rule always triggers a warning (in pro…

…ductive mode this will be logged in the log files)
  • Loading branch information...
1 parent 70ac1c7 commit 760cf33ce377ae8e4f1548fb69891f078677ee53 @dereuromark dereuromark committed Jul 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Model/Validator/CakeValidationRule.php
@@ -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;
}

0 comments on commit 760cf33

Please sign in to comment.