mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fixing fatal errors caused by calling methods that no longer exist.
This commit is contained in:
parent
8cce38692a
commit
65ddc2b040
1 changed files with 1 additions and 2 deletions
|
@ -2449,7 +2449,6 @@ class Model extends Object {
|
|||
$data = array();
|
||||
}
|
||||
|
||||
$Validation =& Validation::getInstance();
|
||||
$exists = $this->exists();
|
||||
|
||||
$_validate = $this->validate;
|
||||
|
@ -2533,7 +2532,7 @@ class Model extends Object {
|
|||
$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]);
|
||||
|
|
Loading…
Add table
Reference in a new issue