Commit 72eae157 authored by Jan Kellermann's avatar Jan Kellermann Committed by Damien McKenna
Browse files

Issue #3363231 by DamienMcKenna, jan kellermann: remove_robots_noydir_noodp:...

Issue #3363231 by DamienMcKenna, jan kellermann: remove_robots_noydir_noodp: TypeError: explode(): Argument #2 ($string) must be of type string, array given.
parent 402ecc6c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@ Metatag 8.x-1.x-dev, 2023-xx-xx
  revision support.
g#3363315 by DamienMcKenna: metatag_post_update_convert_author_data() doesn't
  update the revisions tables.
#3363231 by DamienMcKenna, jan kellermann: remove_robots_noydir_noodp:
  TypeError: explode(): Argument #2 ($string) must be of type string, array
  given.


Metatag 8.x-1.24, 2023-05-26
+6 −1
Original line number Diff line number Diff line
@@ -335,7 +335,12 @@ function metatag_post_update_remove_robots_noydir_noodp(&$sandbox) {
      // only the overridden tags in $new_tags.
      $tags = metatag_data_decode($record->$field_value_field);
      if (!empty($tags['robots'])) {
        if (is_array($tags['robots'])) {
          $new_robots = $old_robots = $tags['robots'];
        }
        else {
          $new_robots = $old_robots = explode(', ', $tags['robots']);
        }
        $new_robots = array_diff($new_robots, ['noodp']);
        $new_robots = array_diff($new_robots, ['noydir']);
        if ($old_robots != $new_robots) {
+92 B (56.5 KiB)

File changed.

No diff preview for this file type.