Skip to content
This repository
Browse code

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...
commit 27952ebc9a5728b50c2cd3338d529c50c8aa2557 1 parent a0321a7
Mark Story authored April 03, 2011

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  cake/libs/controller/controller.php
2  cake/libs/controller/controller.php
@@ -843,7 +843,7 @@ function validateErrors() {
843 843
 				$object =& $this->{$object->alias};
844 844
 			}
845 845
 			$object->set($object->data);
846  
-			$errors = array_merge($errors, $object->invalidFields());
  846
+			$errors = array_merge($errors, (array)$object->invalidFields());
847 847
 		}
848 848
 
849 849
 		return $this->validationErrors = (!empty($errors) ? $errors : false);

0 notes on commit 27952eb

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