mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Fixed strict types exception in attachments list.
This commit is contained in:
parent
f5ceb9c20a
commit
074f0286dc
1 changed files with 1 additions and 1 deletions
|
@ -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];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue