While working on #569094: Get rid of form_set_error() I ran into several calls to form_set_error() and form_get_errors() while the caller isn't necessarily form related; caller has no access to $form_state.

In case of form_set_error() it (the caller) sometimes even assumes itself is called during processing of a form that contains an element with a certain name. For example SearchQuery::executeFirstPass()

Comments

casey’s picture

form_set_error() in:

  • file_save_upload()
  • hook_prepare()
  • openid_begin()
  • SearchQuery::executeFirstPass()
  • image_gd_settings()

form_get_errors() in:

  • comment_preview()
  • node_preview()
  • openid_authentication()
sun’s picture

tim.plunkett’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)

I think all but comment_preview() and node_preview() are gone or changed, and those two will be handled in #2131851: Form errors must be specific to a form and not a global