I don't usually post specific questions like this, and ask for help on a specific issue but I am at the end of my rope wasting time way...
I have a simple D7 module as seen below, when I load the page (who's menu item is exactly where I want it to be) I get the following error:
Recoverable fatal error: Argument 1 passed to drupal_attributes() must be an array, null given, called in /path/to/site/public_html/includes/form.inc on line 3106 and defined in drupal_attributes() (line 2257 of /path/to/site/public_html/includes/common.inc).
as you can see the form declaration itself is very simple, and everything runs peachy keen until the page load.
note, that I have looked at: 3106 in form.inc
and the $element is populated but attributes doesn't exist - what am I missing???
<?php
/**
* Implements hook_menu().
*/
function attach_images_menu() {
$items['admin/structure/types/manage/%/attach/images'] = array(
'title' => 'Attach: Images',
'page callback' => 'attach_images_settings',
'access arguments' => array('access administration pages'),
'weight' => '10',
'type' => MENU_LOCAL_TASK,
);
return $items;
}
function attach_images_settings() {
//$content_type = arg(4);
$form['attach_images_amount_'] = array(
'#type' => 'textfield',
'#title' => 'Amount',
'#default_value' => variable_get('attach_images_amount_',1),
);
return system_settings_form($form);
}
?>