Skip to content
Permalink
Browse files

Fixing fatal errors caused by calling methods that no longer exist.

  • Loading branch information...
markstory committed Apr 24, 2010
1 parent 8cce386 commit 65ddc2b0404145498d5eaab12b8ed08c405ffb6d
Showing with 1 addition and 2 deletions.
  1. +1 −2 cake/libs/model/model.php
@@ -2449,7 +2449,6 @@ function invalidFields($options = array()) {
$data = array();
}
$Validation =& Validation::getInstance();
$exists = $this->exists();
$_validate = $this->validate;
@@ -2533,7 +2532,7 @@ function invalidFields($options = array()) {
$ruleParams[] = $validator;
$ruleParams[0] = array($fieldName => $ruleParams[0]);
$valid = $this->Behaviors->dispatchMethod($this, $rule, $ruleParams);
} elseif (method_exists($Validation, $rule)) {
} elseif (method_exists('Validation', $rule)) {
$valid = $Validation->dispatchMethod($rule, $ruleParams);
} elseif (!is_array($validator['rule'])) {
$valid = preg_match($rule, $data[$fieldName]);

0 comments on commit 65ddc2b

Please sign in to comment.
You can’t perform that action at this time.