Skip to content
Permalink
Browse files

Fixed variable reference

  • Loading branch information...
lorenzo committed Apr 29, 2012
1 parent 3ea2d7b commit 4519ba1221082fe2a735f74645ed596af462ebe3
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Cake/Model/Model.php
@@ -3355,11 +3355,11 @@ protected function _clearCache($type = null) {
* @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);
}

0 comments on commit 4519ba1

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