mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fix failing tests.
Set::merge() accepts anything even non-array values.
This commit is contained in:
parent
a463033ee9
commit
6a9fdd841a
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue