From dfb1a3be22be59d1529bffb644b8d1d0754b90c1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 15 Nov 2021 16:01:11 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: Cannot access offset of type string on string --- api/src/Etemplate/Widget/Vfs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Etemplate/Widget/Vfs.php b/api/src/Etemplate/Widget/Vfs.php index 1a2bb81d35..952ee87817 100644 --- a/api/src/Etemplate/Widget/Vfs.php +++ b/api/src/Etemplate/Widget/Vfs.php @@ -176,7 +176,7 @@ class Vfs extends File self::get_vfs_path($data['to_app'].':'.$data['to_id'])).'/', $file); // store temp. vfs-path like links to be able to move it to correct location after entry is stored - if (!$data['to_id'] || is_array($data['to_id'])) + if (is_array($data) && (empty($data['to_id']) || is_array($data['to_id']))) { Api\Link::link($data['to_app'], $data['to_id'], Api\Link::VFS_APPNAME, array( 'name' => $file['name'],