Commit 6631e93f authored by Damien McKenna's avatar Damien McKenna Committed by Damien McKenna
Browse files

Issue #3265567 by DamienMcKenna, Anatolij Zajika, PCate: PHP8 undefined array key "description".

parent 68dfadd4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ Metatag 8.x-1.x-dev, 2022-xx-xx
  metatag_get_route_entity throws notice when route is null.
#3266326 by victoria-marina, Guilherme Rabelo, DamienMcKenna: Use Dependency
  Injection in MetatagManager.
#3265567 by DamienMcKenna, Anatolij Zajika, PCate: PHP8 undefined array key
  "description".


Metatag 8.x-1.19, 2022-01-06
+2 −2
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ class MetatagController extends ControllerBase {
      ];
      // Group description.
      $build[$group_name]['description'] = [
        '#markup' => $group_definition['description'],
        '#markup' => $group_definition['description'] ?? '',
        '#prefix' => '<p>',
        '#suffix' => '</p>',
      ];
@@ -121,7 +121,7 @@ class MetatagController extends ControllerBase {
        $row = [];
        $row['description'] = [
          'data' => [
            '#markup' => $definition['description'],
            '#markup' => $definition['description'] ?? '',
          ],
          'colspan' => 8,
        ];
+3 −3
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ class MetatagManager implements MetatagManagerInterface {
    foreach ($metatag_groups as $group_name => $group_info) {
      $groups[$group_name]['id'] = $group_info['id'];
      $groups[$group_name]['label'] = $group_info['label']->render();
      $groups[$group_name]['description'] = $group_info['description'];
      $groups[$group_name]['description'] = $group_info['description'] ?? '';
      $groups[$group_name]['weight'] = $group_info['weight'];
    }

@@ -331,7 +331,7 @@ class MetatagManager implements MetatagManagerInterface {
        // Create the fieldset.
        $element[$group_name]['#type'] = 'details';
        $element[$group_name]['#title'] = $group['label'];
        $element[$group_name]['#description'] = $group['description'];
        $element[$group_name]['#description'] = $group['description'] ?? '';
        $element[$group_name]['#open'] = FALSE;

        foreach ($group['tags'] as $tag_name => $tag) {
@@ -683,7 +683,7 @@ class MetatagManager implements MetatagManagerInterface {

    $entity_identifier = '_none';
    if ($entity) {
      $entity_identifier = $entity->getEntityTypeId() . ':' . ($entity->uuid() ?: $entity->id());
      $entity_identifier = $entity->getEntityTypeId() . ':' . ($entity->uuid() ?? $entity->id());
    }

    if (!isset($this->processedTokenCache[$entity_identifier])) {
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ abstract class GroupBase extends PluginBase {
    // @todo Should we have setProperty() methods for each of these?
    $this->id = $plugin_definition['id'];
    $this->label = $plugin_definition['label'];
    $this->description = $plugin_definition['description'];
    $this->description = $plugin_definition['description'] ?? '';
  }

  /**