mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed variable reference
This commit is contained in:
parent
3ea2d7bca5
commit
4519ba1221
1 changed files with 3 additions and 3 deletions
|
@ -3355,11 +3355,11 @@ class Model extends Object implements CakeEventListener {
|
|||
* @return ModelValidator
|
||||
*/
|
||||
public function validator($instance = null) {
|
||||
if ($validator instanceof ModelValidator) {
|
||||
return $this->_validator = $validator;
|
||||
if ($instance instanceof ModelValidator) {
|
||||
return $this->_validator = $instance;
|
||||
}
|
||||
|
||||
if (is_null($validator) && is_null($this->validatorClass)) {
|
||||
if (is_null($instance) && is_null($this->validatorClass)) {
|
||||
$this->_validator = new ModelValidator($this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue