I'm taking my first crack at writing a small module, and I'm getting an error when I try to access my admin settings form. First, here's the relevant code:
/*
* Implementation of hook_menu()
*/
function imagelist_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'admin/settings/imagelist',
'title' => 'ImageList settings',
'description' => t('Settings for the ImageList module.'),
'callback' => 'drupal_get_form',
'callback_arguments' => array('imagelist_admin_settings'),
'access' => user_access('administer imagelist settings')
);
}
return $items;
}
/**
* Define the settings form
*/
function imagelist_admin_settings() {
$form['imagelist_vocabulary'] = array(
'#type' => 'select',
'#title' => 'Select the vocabulary used to categorize photos',
'#options' => taxonomy_get_vocabularies('image'),
'#description' => t('Select the name of the vocabulary that will be used to categorize your photos'),
);
$form['array_filter'] = array('#type' => 'hidden');
return system_settings_form($form);
}
And here's the error I get when I try to access the form from the admin settings page:
* warning: Missing argument 1 for drupal_get_form() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\flickrcck\includes\form.inc on line 48.