fix PHP 8.0 TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given

This commit is contained in:
Ralf Becker 2021-11-16 18:20:19 +01:00
parent bcb2c6fd91
commit bbc7fb93de

View File

@ -1909,6 +1909,10 @@ class Vfs extends Vfs\Base
*/ */
static public function copy_files(array $src, $dst, &$errs=null, array &$copied=null) static public function copy_files(array $src, $dst, &$errs=null, array &$copied=null)
{ {
if (!is_array($copied))
{
$copied = [];
}
if (self::is_dir($dst)) if (self::is_dir($dst))
{ {
foreach ($src as $file) foreach ($src as $file)