diff --git a/lib/Cake/Utility/Folder.php b/lib/Cake/Utility/Folder.php index cf7e83e9a..34325513e 100644 --- a/lib/Cake/Utility/Folder.php +++ b/lib/Cake/Utility/Folder.php @@ -226,10 +226,10 @@ class Folder { } if ($dirs) { - $dirs = call_user_func_array('array_merge', $dirs); + $dirs = call_user_func_array('array_merge', array_values($dirs)); } if ($files) { - $files = call_user_func_array('array_merge', $files); + $files = call_user_func_array('array_merge', array_values($files)); } return array($dirs, $files); }