Prevent exception when glob fails to return an array, fixes #1357
parent
dee9bcb9f1
commit
488624675c
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue