PHP8 - TypeError: in_array()

Created on 22 December 2022, about 2 years ago
Updated 24 January 2023, almost 2 years ago

Problem/Motivation

The same error was already reported here , but I believe that issue was opened for the wrong version. In version 2 this issue seems to be fixed by this change.

TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array() (line 169 of /var/www/html/web/modules/composer/cas/cas.module)

However, the error still exists in 8.x-1.x-dev.

Steps to reproduce

I receive this error during an Ajax call when editing an Address field in the user form with CAS enabled. Also see original report .

Proposed resolution

Apply the same fix 'Properly retrieve the submit handlers' already done on 2.x branch. $form_state->getSubmitHandlers() should always return an array so it's safe to pass to in_array as haystack.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Closed: won't fix

Version

1.0

Component

CAS

Created by

🇧🇪Belgium keszthelyi Brussels

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

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

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024