Before creating "form" custom module, everything was fine. After creating this module, I have got the following error message:
Cannot use string offset as an array in includes\form.inc on line 3575
I deleted the entire custom module folder, and cleared the cache as well. Still, I am getting the same error when modules page.
How do I overcome this error?
coding inside the form.module page is
function form_menu() {
$items = array();
$items['form/form'] = array(
'title' => t('My form'),
'page callback' => 'form_form',
'access arguments' => array('access content'),
'description' => t('My form'),
'type' => MENU_CALLBACK,
);
return $items;
}
/**
* This function gets called in the browser address bar for:
* "http://yourhost/form/form" or
* "http://yourhost/?q=form/form". It will generate
* a page with this form on it.
*/
function form_form() {
// This form calls the form builder function via the
// drupal_get_form() function which takes the name of this form builder
// function as an argument. It returns the results to display the form.
return drupal_get_form('form_my_form');
}
/**
* This function is called the "form builder". It builds the form.
* Notice, it takes one argument, the $form_state
*/
function form_my_form($form_state) {
// This is the first form element. It's a textfield with a label, "Name"
$form['name'] = array(
'#type' => 'textfield',
'#title' => t('Name'),
);
return $form;
}
#
in front of it. Without seeing your code it's impossible to help any furthersystem
table completely, that should reset it. But make a DB backup first of course