array_list error when users tries to login

Created on 2 November 2023, about 1 year ago

Problem/Motivation

On D10.1.5, this module is throwing an error when users, including the super user, tries to login (/user/login) - with the error message "The website encountered an unexpected error. Please try again later.
Watchdog log entry says

TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in array_filter() (line 97 of /app/web/modules/contrib/protected_forms/protected_forms.module).

Steps to reproduce

Proposed resolution

Changing the code on line 97 to the following fixed the issue:
$allowed_scripts = array_filter(\Drupal::config('protected_forms.settings')->get('protected_forms.allowed_scripts') ?? []);

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States arun.chintalapati

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024