I'm upgrading a 4.6 site to 4.7.2. In the old site, I had the following function as part of a module definition:
function my_module_settings() {
$output = form_select(t('Minimum number of words'), 'minimum_my_module_size', variable_get('minimum_my_module_size', 0), drupal_map_assoc(array(0, 10, 25, 50, 75, 100, 125, 150, 175, 200, 500, 1000)), t('The minimum number of words an article must have to be considered valid.'));
return $output;
}
which was copied from some other Drupal module.
I've converted this, via formupdater, to:
function my_module_settings() {
$form['minimum_my_module_size'] = array(
'#type' => 'select',
'#title' => t('Minimum number of words'),
'#default_value' => variable_get('minimum_my_module_size', 0),
'#options' => drupal_map_assoc(array(0, 10, 25, 50, 75, 100, 125, 150, 175, 200, 500, 1000)),
'#description' => t('The minimum number of words an article must have to be considered valid.')
);
$output = drupal_get_form('my_module_settings', $form);
return $output;
}
When the code runs and hits the drupal_get_form call, as part of creating a new bit of content, I get:
Fatal error: Unsupported operand types in /Library/WebServer/Documents/sampleco/includes/form.inc on line 88
I've checked the various postings about this problem, but none of them have helped. My php installation does have mbstring support turned on, btw. Also, the $form variable that gets created seems (I guess?) to be okay, according to var_dump: