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).
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

interdruper created an issue. See original summary.

mohd sahzad’s picture

Assigned: Unassigned » mohd sahzad
interdruper’s picture

Assigned: mohd sahzad » Unassigned
StatusFileSize
new547 bytes

Patch is attached.

interdruper’s picture

Status: Active » Needs review

lobodakyrylo’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.