PHP errors when a webform is closed

Created on 12 February 2025, about 2 months ago

Problem/Motivation

When an anonymous (or without proper permissions) user views a webform that is closed, a PHP error occurs due to a change in 2.2.1 where $form['elements'] does not exist.

TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in array_key_exists() (line 151 of /app/web/modules/contrib/honeypot/src/HoneypotService.php).

Steps to reproduce

  1. Close a webform
  2. View the webform as an anonymous user.
🐛 Bug report
Status

Active

Version

2.2

Component

Code

Created by

🇺🇸United States jackfoust

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

Comments & Activities

Production build 0.71.5 2024