Updating Model to use call_user_func_array instead of methods that were previously inherited from Object.

This commit is contained in:
Mark Story 2010-04-23 20:47:40 -04:00
parent 65ddc2b040
commit c9f103432c

View file

@ -2533,7 +2533,7 @@ class Model extends Object {
$ruleParams[0] = array($fieldName => $ruleParams[0]); $ruleParams[0] = array($fieldName => $ruleParams[0]);
$valid = $this->Behaviors->dispatchMethod($this, $rule, $ruleParams); $valid = $this->Behaviors->dispatchMethod($this, $rule, $ruleParams);
} elseif (method_exists('Validation', $rule)) { } elseif (method_exists('Validation', $rule)) {
$valid = $Validation->dispatchMethod($rule, $ruleParams); $valid = call_user_func_array(array('Validation', $rule), $ruleParams);
} elseif (!is_array($validator['rule'])) { } elseif (!is_array($validator['rule'])) {
$valid = preg_match($rule, $data[$fieldName]); $valid = preg_match($rule, $data[$fieldName]);
} elseif (Configure::read('debug') > 0) { } elseif (Configure::read('debug') > 0) {