Commit b5014451 authored by Nikita Sineok's avatar Nikita Sineok Committed by Martin Postma
Browse files

Issue #3174287 by nikita_tt, azslay: Notices and Warnings in TablefieldItem

parent 86529b5d
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -186,6 +186,7 @@ class TablefieldItem extends FieldItemBase {
    // If "Lock defaults" is enabled the table needs sorting.
    $lock = $this->getFieldDefinition()->getSetting('lock_values');
    if ($lock) {
      if (!empty($values['value']) && is_array($values['value'])) {
        // Sort columns on key.
        foreach ($values['value'] as $key => $value) {
          if (is_array($value)) {
@@ -194,7 +195,6 @@ class TablefieldItem extends FieldItemBase {
          }
        }
        // Sort rows on key.
      if (is_array($values['value'])) {
        ksort($values['value']);
      }
    }