Cannot use string offset as an array in includes\form.inc on line 3575 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' =&gt; t('My form'),
        'page callback' =&gt; 'form_form',
        'access arguments' =&gt; array('access content'),
        'description' =&gt; t('My form'),
        'type' =&gt; 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' =&gt; 'textfield',
        '#title' =&gt; t('Name'),
      );
      return $form;
    }
Deleting the module folder outright, without uninstalling it through the UI/Drush (even manually in the DB) is bound to cause a few problems.

To get rid of any errors caused by Drupal thinking the module files are still there, you can simply delete the row in the system table which corresponds to the relevant module; but make a database backup first, of course.

In case you haven't come across the pages before, you can disable modules at http://mysite.com/admin/modules and uninstall them at http://mysite.com/admin/modules/uninstall through the UI, or use Drush.