Skip to content

Commit 519a8eb

Browse files
author
René Hrdina
committed
update check for maxFileSize which now defaults to null instead of false
1 parent 3cb6bcd commit 519a8eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bundle/Form/FieldTypeHandler/EnhancedFile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ protected function buildFieldForm(
6969
$maxFileSize = $fieldDefinition->validatorConfiguration['FileSizeValidator']['maxFileSize'];
7070
$allowedExtensions = $fieldDefinition->fieldSettings['allowedTypes'];
7171

72-
if (false !== $maxFileSize || !empty($allowedExtensions)) {
72+
if (null !== $maxFileSize || !empty($allowedExtensions)) {
7373
$constraints = array();
7474

75-
if (false !== $maxFileSize && !empty($maxFileSize)) {
75+
if (null !== $maxFileSize && !empty($maxFileSize)) {
7676
$constraints['maxSize'] = strval($maxFileSize) . "M";
7777
}
7878

0 commit comments

Comments
 (0)