From 074f0286dc7e8670cf4f953a388b4f1163cb4ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Tue, 7 Jan 2020 19:38:11 +0100 Subject: [PATCH] Fixed strict types exception in attachments list. --- src/Services/Attachments/AttachmentManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Services/Attachments/AttachmentManager.php b/src/Services/Attachments/AttachmentManager.php index 2d43721e..95c0bc27 100644 --- a/src/Services/Attachments/AttachmentManager.php +++ b/src/Services/Attachments/AttachmentManager.php @@ -157,7 +157,7 @@ class AttachmentManager //Taken from: https://www.php.net/manual/de/function.filesize.php#106569 and slightly modified $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]; }