Unverified Commit 1da6755c authored by dpi's avatar dpi
Browse files

Issue #3028186 by dpi, banoodle: Can't save new nodes following beta2 upgrade (Assertion Error)

parent bae7a088
Loading
Loading
Loading
Loading
+1 −3
Changes for src/Plugin/Field/FieldType/DateRecurFieldItemList.php: 1 added line, 3 removed lines.
Original line number Diff line number Diff line
@@ -168,9 +168,7 @@ class DateRecurFieldItemList extends DateRangeFieldItemList {

    $hasDefaultStartDateType = !empty($defaultValue[0]['default_date_type']);
    $hasDefaultEndDateType = !empty($defaultValue[0]['default_end_date_type']);
    if ($hasDefaultStartDateType || $hasDefaultEndDateType) {
      // A time zone must be set to continue with default start/end dates.
      assert(!empty($defaultDateTimeZone));
    if (!empty($defaultDateTimeZone) && ($hasDefaultStartDateType || $hasDefaultEndDateType)) {
      $storageFormat = $definition->getSetting('datetime_type') == DateRecurItem::DATETIME_TYPE_DATE ? DateRecurItem::DATE_STORAGE_FORMAT : DateRecurItem::DATETIME_STORAGE_FORMAT;

      // Instruct 'value' and 'end_value' to convert from the localised time