From bbc7fb93de71e27eb4f6369968bbb720ef74410a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 16 Nov 2021 18:20:19 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given --- api/src/Vfs.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/src/Vfs.php b/api/src/Vfs.php index 291407118a..931975dd37 100644 --- a/api/src/Vfs.php +++ b/api/src/Vfs.php @@ -1909,6 +1909,10 @@ class Vfs extends Vfs\Base */ static public function copy_files(array $src, $dst, &$errs=null, array &$copied=null) { + if (!is_array($copied)) + { + $copied = []; + } if (self::is_dir($dst)) { foreach ($src as $file)