Fix TypeError: array_values(): Argument #1 ($array) must be of type array, null given in array_values() (line 59 in GoogleAnalyticsMigrator

Created on 11 April 2023, over 1 year ago
Updated 25 April 2023, over 1 year ago

Problem/Motivation

Having the following error on install

 TypeError: array_values(): Argument #1 ($array) must be of type array, null given in array_values() (line 59 of /var/www/html/dev/drupal10/docroot/modules/contrib/google_tag/src/Migration/GoogleAnalyticsMigrator.php).

Steps to reproduce

On install of the module under Drupal 10 and PHP 8.1

Proposed resolution

Use is_array to check

Remaining tasks

  • File an issue
  • Patch/MR
  • Test
  • Review

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A
πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024