1
0
mirror of https://github.com/EGroupware/egroupware.git synced 2025-02-22 13:20:50 +01:00

fix PHP 8.0 TypeError: count(): Argument ($value) must be of type Countable|array, null given

This commit is contained in:
Ralf Becker 2021-11-05 15:18:57 +01:00
parent a50054b8c7
commit 2f1559a490

View File

@ -5062,7 +5062,7 @@ class Mail
static function &getdisplayableBody(&$mailClass, $bodyParts, $preserveHTML = false, $useTidy = true)
{
$message='';
for($i=0, $cnt=count($bodyParts); $i < $cnt; $i++)
for($i=0, $cnt=count($bodyParts ?? []); $i < $cnt; $i++)
{
if (!isset($bodyParts[$i]['body'])) {
$bodyParts[$i]['body'] = self::getdisplayableBody($mailClass, $bodyParts[$i], $preserveHTML, $useTidy);