How to reproduce:
- Make a webform (e.g. with a single textfield)
- Go to the 'Results' tab of this webform
- Under the 'Results' tab, go to the 'Download' tab of this webform
- Go to an other page
- The following message should appear:
Notice: Undefined index: #title in theme_webform_inline_radio() (line 2594 of /sites/all/modules/webform/webform.module).

CommentFileSizeAuthor
#8 1287472-8.patch654 bytesjelle_s
#6 1287472.patch599 bytesjelle_s

Comments

markusbroman’s picture

subscribe

wipeout_dude’s picture

subscribe

KIGA’s picture

subscribe

kleve’s picture

Adding if (isset($element['#inline_element'])) before line 2594 removes the error message. Not sure if this is a good solution or if the #title is supposed to exist every time?

// Add container-inline to all elements.
  $class[] = 'webform-container-inline';
  if (isset($element['#inline_element'])) {
    if (isset($variables['element']['#title'])) {
      $variables['element']['#title'] = $variables['element']['#title'] . ': ';
    }
  }
kleve’s picture

subscribe

jelle_s’s picture

Status: Active » Needs review
StatusFileSize
new599 bytes

Added patch based on comment #4 by @Kleve
patched from 7.x-1.13

knv’s picture

May be checking the existence of #title key in array and short circuit the condition is a better solution. Something like this:
if (array_exists_key('#title', $variables['element']) && isset($variables['element']['#title']))

jelle_s’s picture

StatusFileSize
new654 bytes

Rewritten patch based on #7

shawn dearmond’s picture

Status: Needs review » Reviewed & tested by the community

I noticed this error as well. Patch worked for me.

quicksketch’s picture

Status: Reviewed & tested by the community » Closed (duplicate)