Fixed strict types exception in attachments list.

This commit is contained in:
Jan Böhmer 2020-01-07 19:38:11 +01:00
parent f5ceb9c20a
commit 074f0286dc

View file

@ -157,7 +157,7 @@ class AttachmentManager
//Taken from: https://www.php.net/manual/de/function.filesize.php#106569 and slightly modified //Taken from: https://www.php.net/manual/de/function.filesize.php#106569 and slightly modified
$sz = 'BKMGTP'; $sz = 'BKMGTP';
$factor = (int) floor((strlen($bytes) - 1) / 3); $factor = (int) floor((strlen((string) $bytes) - 1) / 3);
return sprintf("%.{$decimals}f", $bytes / 1024 ** $factor).@$sz[$factor]; return sprintf("%.{$decimals}f", $bytes / 1024 ** $factor).@$sz[$factor];
} }