Clear data and validationErrors *after* calling clearCache().

Having both properties cleaned after clearCache() means that you can use
the model data in specialized clearCache() implementations.

Fixes #3386
This commit is contained in:
mark_story 2014-04-24 09:19:00 -04:00
parent 5eff011711
commit 9d19801cfa

View file

@ -1865,9 +1865,9 @@ class Model extends Object implements CakeEventListener {
$success = $this->data;
}
$this->data = false;
$this->_clearCache();
$this->validationErrors = array();
$this->data = false;
}
$this->whitelist = $_whitelist;