Commit 2e716070 authored by alexpott's avatar alexpott

Issue #2981853 by m.ioannidis: Make $element['#files'] always an array in ManagedFile

parent 0083ba97
......@@ -217,7 +217,7 @@ public static function processManagedFile(&$element, FormStateInterface $form_st
// Set some default element properties.
$element['#progress_indicator'] = empty($element['#progress_indicator']) ? 'none' : $element['#progress_indicator'];
$element['#files'] = !empty($fids) ? File::loadMultiple($fids) : FALSE;
$element['#files'] = !empty($fids) ? File::loadMultiple($fids) : [];
$element['#tree'] = TRUE;
// Generate a unique wrapper HTML ID.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment