Fatal error: Cannot use object of type stdClass as array in I get an fatal error on the 'add content page'. 

Fatal error: Cannot use object of type stdClass as array in

function mymodule_form($form, $form_state){
    $form['mymodule'] = array(
        '#type' =&gt; 'textfield',
        '#description' =&gt; t('Please enter your text here.'),
        '#required' =&gt; TRUE,
    );
    $form['mymodule_submit'] = array(
        '#type' =&gt; 'submit',
        '#value' =&gt; 'Submit this form'
    );

    return $form;
    return node_content_form($node, $form_state);
}


The problem's happen when I add my form, when I use only the

return node_content_form($node, $form_state);


it is working fine, what do I wrong?
There are two related but distinct concepts that seem to be conflated in your code, i.e. hook_form, and the notion of a drupal form builder function. Hook_form uses the template explained by @gisleHannemyr.

The template for a form builder function is:

function mymodule_example_form($form, &amp;$form_state) {  
  ...
  return $form;
}


Use hook_form to create or override node creation forms, and a form builder function for any other (non-node-related) form.

If you simply want to alter an existing (node or other) form, you should use hook_form_alter, instead.