diff --git a/src/lib/Form/Type/FieldType/ImageAssetFieldType.php b/src/lib/Form/Type/FieldType/ImageAssetFieldType.php index c4abd479..87811374 100644 --- a/src/lib/Form/Type/FieldType/ImageAssetFieldType.php +++ b/src/lib/Form/Type/FieldType/ImageAssetFieldType.php @@ -122,10 +122,8 @@ public function configureOptions(OptionsResolver $resolver) /** * Returns max size of uploaded file in bytes. - * - * @return int */ - private function getMaxFileSize(): int + private function getMaxFileSize(): float { $validatorConfiguration = $this->assetMapper ->getAssetFieldDefinition() @@ -133,10 +131,10 @@ private function getMaxFileSize(): int $maxFileSize = $validatorConfiguration['FileSizeValidator']['maxFileSize']; if ($maxFileSize > 0) { - return min($maxFileSize * 1024 * 1024, $this->maxUploadSize->get()); + return (float)min($maxFileSize * 1024 * 1024, $this->maxUploadSize->get()); } - return $this->maxUploadSize->get(); + return (float)$this->maxUploadSize->get(); } }