Fixing missing array cast that could result in warnings from array_merge

if a model or behavior returned false from a beforeValidate callback.
Fixes #1629
This commit is contained in:
Mark Story 2011-04-03 11:01:55 -04:00
parent a0321a723b
commit 27952ebc9a

View file

@ -843,7 +843,7 @@ class Controller extends Object {
$object =& $this->{$object->alias};
}
$object->set($object->data);
$errors = array_merge($errors, $object->invalidFields());
$errors = array_merge($errors, (array)$object->invalidFields());
}
return $this->validationErrors = (!empty($errors) ? $errors : false);