mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Updating Model to use call_user_func_array instead of methods that were previously inherited from Object.
This commit is contained in:
parent
65ddc2b040
commit
c9f103432c
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue