Problem/Motivation

I'm not entirely what's causing it, but on a site I help maintain the following error is logged:
Notice: Undefined index: #submit in tfa_form_alter() (line 249 of tfa.module).

Steps to reproduce

TBD

Proposed resolution

Verify that $form['#submit'] exists before passing it into array_search().

Remaining tasks

Fix the bug.

User interface changes

n/a

API changes

n/a

Data model changes

n/a

CommentFileSizeAuthor
#2 tfa-n3322478-2.patch724 bytesdamienmckenna

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new724 bytes

If $form['#submit'] doesn't exist then just default $key to 0.

jcnventura’s picture

Status: Needs review » Needs work

Can be slightly simplified, but the code is so simple that I'll just simplify and commit.

  • a9c1a18 committed on 7.x-2.x
    Issue #3322478 by DamienMcKenna, jcnventura: $form['#submit'] doesn't...
jcnventura’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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