TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array()

Created on 27 February 2023, over 1 year ago
Updated 10 October 2023, 9 months ago

Problem/Motivation

Seen while executing a migration in Drupal 9.5.3:
[error] TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array() (line 352 of /code/web/modules/contrib/disqus/disqus.module).

Steps to reproduce

Proposed resolution

Since I do not require this migration functionality within Disqus and needed to move forward, I simply returned from disqus_migrate_prepare_row immediately as a quick workaround. The actual fix may be as simple as bailing before the test in line 352 if $migration->getMigrationTags() returns null, but I don't feel qualified to make that assessment.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024