Skip to content
This repository
Browse code

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...
commit 760cf33ce377ae8e4f1548fb69891f078677ee53 1 parent 70ac1c7
Mark authored July 17, 2012
2  lib/Cake/Model/Validator/CakeValidationRule.php
@@ -274,7 +274,7 @@ public function process($field, &$data, &$methods) {
274 274
 			$this->_valid = call_user_func_array(array('Validation', $this->_rule), $this->_ruleParams);
275 275
 		} elseif (is_string($validator['rule'])) {
276 276
 			$this->_valid = preg_match($this->_rule, $data[$field]);
277  
-		} elseif (Configure::read('debug') > 0) {
  277
+		} else {
278 278
 			trigger_error(__d('cake_dev', 'Could not find validation handler %s for %s', $this->_rule, $field), E_USER_WARNING);
279 279
 			return false;
280 280
 		}

0 notes on commit 760cf33

Please sign in to comment.
Something went wrong with that request. Please try again.