Browse files

Fix failing tests.

Set::merge() accepts anything even non-array values.
  • Loading branch information...
1 parent a463033 commit 6a9fdd841a9df78f0f837cab59612f4af2da6900 @markstory markstory committed Mar 31, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/Cake/Utility/Set.php
View
6 lib/Cake/Utility/Set.php
@@ -45,6 +45,12 @@ class Set {
*/
public static function merge($arr1, $arr2 = null) {
$args = func_get_args();
+ if (empty($args[1])) {
+ return (array)$args[0];
+ }
+ if (!is_array($args[0])) {
+ $args[0] = (array)$args[0];
+ }
return call_user_func_array('Hash::merge', $args);
}

0 comments on commit 6a9fdd8

Please sign in to comment.