make sure a missing validation rule always triggers a warning (in productive mode this will be logged in the log files)

This commit is contained in:
euromark 2012-07-17 10:47:20 +02:00
parent 70ac1c7e33
commit 760cf33ce3

View file

@ -274,7 +274,7 @@ class CakeValidationRule {
$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;
}