Permalink
Browse files

No need to create new instance of ModelValidator when one is already …

…created
  • Loading branch information...
1 parent 60c611f commit 71112d1225a17671cb9f8f60e48d84020c8e68c6 @ceeram ceeram committed Jun 20, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Model/Model.php
View
@@ -3396,7 +3396,7 @@ public function validator($instance = null) {
return $this->_validator = $instance;
}
- if (is_null($instance)) {
+ if (empty($this->_validator) && is_null($instance)) {
$this->_validator = new ModelValidator($this);
}

0 comments on commit 71112d1

Please sign in to comment.