From 27952ebc9a5728b50c2cd3338d529c50c8aa2557 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sun, 3 Apr 2011 11:01:55 -0400 Subject: [PATCH] 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 --- cake/libs/controller/controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cake/libs/controller/controller.php b/cake/libs/controller/controller.php index 0bfe924f0..f7dc039f7 100644 --- a/cake/libs/controller/controller.php +++ b/cake/libs/controller/controller.php @@ -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);