mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-09 16:59:03 +01:00
Fixed strict types exception in attachments list.
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user