If an empty message such as

form_set_error('my_element');

Is sent the error is recorded but no error class is added to element enough the value exists in the error array. This appears to be a bug given that the error is recorded but the value returned causes the if statement to fail. Attached patch modifies the behaviour in _form_set_class to check that we have a none null value returned.

First git patch so hopefully it works correctly.

CommentFileSizeAuthor
#4 form_error.patch687 bytesmarcingy
#1 form_error.patch687 bytesmarcingy
form_error.patch615 bytesmarcingy

Comments

marcingy’s picture

StatusFileSize
new687 bytes

Rework logic a bit.

marcingy’s picture

Status: Needs review » Needs work
marcingy’s picture

Status: Needs work » Needs review
marcingy’s picture

StatusFileSize
new687 bytes

Readding patch to see if this wakes the bot up

steven jones’s picture

Subscribe.

dave reid’s picture

Status: Needs review » Closed (duplicate)