Skip to content

Commit 3439f73

Browse files
committed
MAGETWO-90241: Image Uploader maxFileSize configuration can exceed PHP's upload_max_filesize
Null coalesce to zero if maxFileSize is null
1 parent 3e1ef92 commit 3439f73

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Ui/Component/Form/Element/DataType/Media

1 file changed

+1
-1
lines changed

app/code/Magento/Ui/Component/Form/Element/DataType/Media/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function prepare()
6565
{
6666
// dynamically set max file size based on php ini config if not present in XML
6767
$maxFileSize = min(array_filter([
68-
$this->getConfiguration()['maxFileSize'] ?? null,
68+
$this->getConfiguration()['maxFileSize'] ?? 0,
6969
$this->fileSize->getMaxFileSize()
7070
]));
7171

0 commit comments

Comments
 (0)