diff --git a/core/lib/Drupal/Core/Field/WidgetBase.php b/core/lib/Drupal/Core/Field/WidgetBase.php index e97816e..075e142 100644 --- a/core/lib/Drupal/Core/Field/WidgetBase.php +++ b/core/lib/Drupal/Core/Field/WidgetBase.php @@ -427,7 +427,7 @@ public function massageFormValues(array $values, array $form, array &$form_state */ protected function sortItems(FieldItemListInterface $items) { if ($this->fieldDefinition->isMultiple() && isset($items[0]->_weight)) { - $itemValues = $items->getValue(); + $itemValues = $items->getValue(TRUE); usort($itemValues, function ($a, $b) { $a_weight = (is_array($a) ? $a['_weight'] : 0); $b_weight = (is_array($b) ? $b['_weight'] : 0); diff --git a/core/modules/file/file.field.inc b/core/modules/file/file.field.inc index c7ca17e..a65e08a 100644 --- a/core/modules/file/file.field.inc +++ b/core/modules/file/file.field.inc @@ -521,7 +521,7 @@ function file_field_find_file_reference_column(FieldInterface $field) { * * @param $variables * An associative array containing: - * - items: An array of FileFieldItem items. + * - items: field values, as a FileFieldItemList object. * * @ingroup themeable */