From 3003ed580c48b00b9bfb9532550853d10d8d7851 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 15 Nov 2021 12:00:50 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: Cannot access offset of type string on string --- mail/inc/class.mail_integration.inc.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mail/inc/class.mail_integration.inc.php b/mail/inc/class.mail_integration.inc.php index 14e927b82d..449048fe72 100644 --- a/mail/inc/class.mail_integration.inc.php +++ b/mail/inc/class.mail_integration.inc.php @@ -414,8 +414,7 @@ class mail_integration { $replace = array(); foreach($links as $link) { - $matches = null; - if (is_array($link) && $link['id']['egw_data'] && strpos($html, self::INLINE_PREFIX . $link['id']['egw_data']) !== false) + if (is_array($link) && is_array($link['id']) && !empty($link['id']['egw_data']) && strpos($html, self::INLINE_PREFIX . $link['id']['egw_data']) !== false) { $replace[self::INLINE_PREFIX. $link['id']['egw_data']] = Api\Egw::link(Api\Vfs::download_url(Api\Link::vfs_path($app, $id, Api\Vfs::basename($link['id']['name']))));