Merge pull request #643 from nodesagency/hotfix/beforeValidate-copy-data

Hotfix/before validate copy data ( Another fix for Pull request 642 )
This commit is contained in:
José Lorenzo Rodríguez 2012-05-09 14:40:46 -07:00
commit b4a42e4a03

View file

@ -2044,6 +2044,7 @@ class Model extends Object implements CakeEventListener {
if ($options['validate'] === 'first') {
$validates = $this->validateMany($data, $options);
$data = $this->data;
if ((!$validates && $options['atomic']) || (!$options['atomic'] && in_array(false, $validates, true))) {
return $validates;
}