Commit 0a9c56f0 authored by Primsi's avatar Primsi Committed by Primsi

Issue #3083640 by Primsi, Berdir: Check before adding the result of createFile to the entity list

parent 691a3272
......@@ -226,9 +226,11 @@ class DropzoneJsEbWidget extends WidgetBase {
$this->currentUser,
$additional_validators
);
if ($entity) {
$files[] = $entity;
}
}
}
if ($form['widget']['upload']['#max_files']) {
$files = array_slice($files, -$form['widget']['upload']['#max_files']);
......
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