Prevent exception when glob fails to return an array, fixes #1357
parent
dee9bcb9f1
commit
488624675c
|
@ -100,8 +100,10 @@ class Factory
|
|||
continue;
|
||||
}
|
||||
}
|
||||
foreach (glob($oldPathMatch) as $child) {
|
||||
@rename($child, $dir.'/'.basename($child));
|
||||
if (is_array($children = glob($oldPathMatch))) {
|
||||
foreach ($children as $child) {
|
||||
@rename($child, $dir.'/'.basename($child));
|
||||
}
|
||||
}
|
||||
@unlink($oldPath);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue