Warning: Undefined array key "#id" in comments_order_form_alter() (line 154 of comments_order.module)

Created on 7 February 2024, 5 months ago

Problem/Motivation

These couple of PHP warnings may be triggered in certain cases, when a form without $form['#id] is rendered , i.e. 'block_form'

Steps to reproduce

Using the module Context , place any block in any context.

Proposed resolution

In comments_order_form_alter(), check that $form['#id] exists before using it.

Warning: Undefined array key "#id" in comments_order_form_alter() (line 154 of comments_order.module).
 Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in comments_order_form_alter() (line 154 of comments_order.module).
🐛 Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

🇪🇸Spain interdruper

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024