Added check for empty array, removes warning. Closes #5012.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7299 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mark_story 2008-06-29 21:26:37 +00:00
parent 4b1de6ac0e
commit 551cf75bbc

View file

@ -525,11 +525,12 @@ if (!function_exists('clone')) {
$files = glob($cache); $files = glob($cache);
$cache = CACHE . $type . DS . '*' . $params . '_*' . $ext; $cache = CACHE . $type . DS . '*' . $params . '_*' . $ext;
$files = array_merge($files, glob($cache));
if ($files === false) { if ($files === false) {
return false; return false;
} }
$files = array_merge($files, glob($cache));
foreach ($files as $file) { foreach ($files as $file) {
if (is_file($file)) { if (is_file($file)) {