summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/Render
diff options
context:
space:
mode:
authorAlex Pott2018-12-07 10:32:39 (GMT)
committerAlex Pott2018-12-07 10:32:47 (GMT)
commit5a425303580e58c5503779ad9066448384a64a41 (patch)
treefeaa6d399f4af1ad56ae40465b6f5ce0d9da7f24 /core/lib/Drupal/Core/Render
parent74542fac1201884de601df00aa19c75f685151aa (diff)
Issue #2916595 by phenaproxima, AdamPS, Wim Leers: File element discards attributes if #multiple
(cherry picked from commit f7f07d81ac606cc26c5c7e21cdd5a72b5d59b482)
Diffstat (limited to 'core/lib/Drupal/Core/Render')
-rw-r--r--core/lib/Drupal/Core/Render/Element/File.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/lib/Drupal/Core/Render/Element/File.php b/core/lib/Drupal/Core/Render/Element/File.php
index 07bd415..bf2310a 100644
--- a/core/lib/Drupal/Core/Render/Element/File.php
+++ b/core/lib/Drupal/Core/Render/Element/File.php
@@ -44,7 +44,7 @@ class File extends FormElement {
*/
public static function processFile(&$element, FormStateInterface $form_state, &$complete_form) {
if ($element['#multiple']) {
- $element['#attributes'] = ['multiple' => 'multiple'];
+ $element['#attributes']['multiple'] = 'multiple';
$element['#name'] .= '[]';
}
return $element;