Skip to content

Commit

Permalink
Fixed variable reference
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Apr 29, 2012
1 parent 3ea2d7b commit 4519ba1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Cake/Model/Model.php
Expand Up @@ -3355,11 +3355,11 @@ protected function _clearCache($type = null) {
* @return ModelValidator * @return ModelValidator
*/ */
public function validator($instance = null) { public function validator($instance = null) {
if ($validator instanceof ModelValidator) { if ($instance instanceof ModelValidator) {
return $this->_validator = $validator; 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); $this->_validator = new ModelValidator($this);
} }


Expand Down

0 comments on commit 4519ba1

Please sign in to comment.