Commit 3debf40b authored by Eli's avatar Eli Committed by Damien McKenna
Browse files

Issue #3280904 by DamienMcKenna, 3li: Automatic conversion of false to array is deprecated.

parent 2d5c06ee
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@ Metatag 8.x-1.x-dev, 2022-xx-xx
  limit.
#3269742 by DamienMcKenna, z3cka: Migrate D7 Product Display node metatag data
  to D9 Drupal Commerce Product entities.
#3280904 by DamienMcKenna, 3li: Automatic conversion of false to array is
  deprecated.


Metatag 8.x-1.19, 2022-01-06
+7 −0
Original line number Diff line number Diff line
@@ -144,6 +144,13 @@ class MetatagFirehose extends WidgetBase implements ContainerFactoryPluginInterf
      $values = unserialize($item->value);
    }

    // Make sure that this variable is always an array to avoid problems when
    // unserializing didn't work correctly and it as returned as FALSE.
    // @see https://www.php.net/unserialize
    if (!is_array($values)) {
      $values = [];
    }

    // Populate fields which have not been overridden in the entity.
    if (!empty($default_tags)) {
      foreach ($default_tags as $tag_id => $tag_value) {