Commit 34162054 authored by Mark Fullmer's avatar Mark Fullmer Committed by Mark Fullmer
Browse files

Issue #3222209 by mstrelan, mark_fullmer: Compatibility with PHP 8

parent 148b66b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -444,7 +444,7 @@ class AllowedBlocksForm extends FormBase {
  protected function getBlockDefault($block_id, $category, $temp_data) {
    // Attempt to retrieve default value from tempStore, then from config.
    if (!is_null($temp_data)) {
      if (isset($temp_data[$category])) {
      if (isset($temp_data[$category]['restrictions'])) {
        return in_array($block_id, array_keys($temp_data[$category]['restrictions']));
      }
      else {
+3 −3
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ class EntityViewModeRestrictionByRegion extends LayoutBuilderRestrictionBase {
                $delta = $content_block_types_by_uuid[$uuid];
              }
            }
            if (in_array($category, $restricted_categories[$region])) {
            if (isset($restricted_categories[$region]) && in_array($category, $restricted_categories[$region])) {
              unset($definitions[$original_delta]);
            }
            elseif (isset($whitelisted_blocks[$region]) && in_array($category, array_keys($whitelisted_blocks[$region]))) {
@@ -222,10 +222,10 @@ class EntityViewModeRestrictionByRegion extends LayoutBuilderRestrictionBase {
        // the restriction will be removed, below.
        $has_restrictions = TRUE;
      }
      if (in_array($category, array_values($restricted_categories[$region_to]))) {
      if (isset($restricted_categories[$region_to]) && in_array($category, array_values($restricted_categories[$region_to]))) {
        $has_restrictions = TRUE;
      }
      if (!isset($restricted_categories[$region_to][$category]) && !isset($blacklisted_blocks[$region_to][$category]) && !isset($whitelisted_blocks[$region_to][$category]) && !in_array($category, array_values($restricted_categories[$region_to])) && $category != "Custom blocks") {
      elseif (!isset($restricted_categories[$region_to][$category]) && !isset($blacklisted_blocks[$region_to][$category]) && !isset($whitelisted_blocks[$region_to][$category]) && $category != "Custom blocks") {
        // No restrictions have been placed on this category.
        $has_restrictions = FALSE;
      }