Skip to content
Browse files

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
  • Loading branch information...
1 parent a0321a7 commit 27952ebc9a5728b50c2cd3338d529c50c8aa2557 @markstory markstory committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 cake/libs/controller/controller.php
View
2 cake/libs/controller/controller.php
@@ -843,7 +843,7 @@ function validateErrors() {
$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);

0 comments on commit 27952eb

Please sign in to comment.
Something went wrong with that request. Please try again.