mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-06 23:39:51 +01:00
Fixed static analysis issue
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user