The above PHP notice is being raised in cases where form elements to not have a #type set on them.

However, for certain elements, it is fine for them not to - e.g. the top-level form element itself, #markup elements etc.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jamsilver’s picture

Assigned: jamsilver » Unassigned
Status: Needs work » Needs review
FileSize
1.01 KB

Patch attached.

stijndm’s picture

Status: Needs review » Closed (cannot reproduce)

The code you are trying to fix here does not exist anymore. Please check the version you are using, also, try creating and testing patches on the latest development version.

Thx
Stijn

pontus_nilsson’s picture

FileSize
597 bytes

I think jamsilver is referring to and already has applied the code in issue 1800974 (array_search() acts differently in PHP 5.2 and 5.3) and has added code on top of that.

The provided patch combines the patch in jamsilver's comment with the code in the issue 1800974.

jamsilver’s picture

Status: Closed (cannot reproduce) » Closed (duplicate)

Ah, sorry! Yes, that's clearly what I've done =). I have put your patch onto #1800974: array_search() acts differently in PHP 5.2 and 5.3, which seems like a more reasonable place for it.