1
0
Fork 0

Prevent exception when glob fails to return an array, fixes #1357

pull/1361/merge
Jordi Boggiano 2012-11-24 16:13:35 +01:00
parent dee9bcb9f1
commit 488624675c
1 changed files with 4 additions and 2 deletions

View File

@ -100,8 +100,10 @@ class Factory
continue; continue;
} }
} }
foreach (glob($oldPathMatch) as $child) { if (is_array($children = glob($oldPathMatch))) {
@rename($child, $dir.'/'.basename($child)); foreach ($children as $child) {
@rename($child, $dir.'/'.basename($child));
}
} }
@unlink($oldPath); @unlink($oldPath);
} }