In the advpoll_form function there where some incorrect checks. See the WARNINGS in the corrected codes below. This caused the form to load incorrect settings while editing.

    $form['settings']['maxchoices'] = array(
  		'#type' => 'select',
  		'#title' => t('Maximum Choices'),
                // WARNING: isset was not used here
  		'#default_value' => (isset($node->maxchoices)? $node->maxchoices : 0), 
  		'#options' => $maxChoiceList,
  		'#description' => t('Limits the total number of choices voters may select.')
  	);

  $form['settings']['runtime'] = array(
		'#type' => 'select',
		'#title' => t('Poll duration'),
                // WARNING: isset was not used here
		'#default_value' => (isset($node->runtime)? $node->runtime : 3),
		'#options' => $_duration,
		'#description' => t('After this period, the poll will be closed automatically.')
	);

Comments

ChrisKennedy’s picture

Status: Needs review » Active

We are no longer officially supporting 4.7. However, if you submit a patch I'll commit it.

ChrisKennedy’s picture

Status: Active » Fixed
ChrisKennedy’s picture

Title: Patch for a small bug » 2 lines missing isset() in advpoll_form()
Anonymous’s picture

Status: Fixed » Closed (fixed)

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