mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
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:
parent
70ac1c7e33
commit
760cf33ce3
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue