mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 18:28:49 +02:00
Fixed static analysis issue
This commit is contained in:
parent
4f43f10672
commit
27de5ae387
1 changed files with 1 additions and 1 deletions
|
@ -444,7 +444,7 @@ class AttachmentSubmitHandler
|
|||
if (ctype_digit((string) $maxSize)) {
|
||||
return (int) $maxSize;
|
||||
} elseif (preg_match('/^(\d++)('.implode('|', array_keys($factors)).')$/i', $maxSize, $matches)) {
|
||||
return $matches[1] * $factors[$unit = strtolower($matches[2])];
|
||||
return (((int) $matches[1]) * $factors[strtolower($matches[2])]);
|
||||
} else {
|
||||
throw new RuntimeException(sprintf('"%s" is not a valid maximum size.', $maxSize));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue