Missing argument 1 for hook_menu() I'm getting this error in my custom module.


  [warning] Missing argument 1 for signin_menu(), called in
  /public_html/includes/menu.inc on line 2813 and defined
  signin.module:2


here is my code to create hook menu call back.

function signin_menu(&amp;$items) {
  $items = array();

  $items['signin'] = array(
    'title' =&gt; 'Sign In',
    'description' =&gt; 'Sign In Form',
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('user_login'),
    'access callback' =&gt; TRUE
  );

  return $items;
}
In Drupal 6 and Drupal 7, hook_menu() implementations don't get any argument. That is the reason of the error message.
They got an argument in previous Drupal versions, but it was not passed by reference. It's probable you are getting confused between hook_menu() and hook_menu_alter(). The latter gets a $&amp;items parameter, but the purpose of the hook is slightly different. (It's altering routes defined from other modules, rather than defining new routes.)

As side note, I would rather use the following code.

function signin_menu() {
  $items = array();

  $items['signin'] = array(
    'title' =&gt; 'Sign in',
    'description' =&gt; 'Sign in form',
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('user_login'),
    'access callback' =&gt; 'user_is_anonymous',
  );

  return $items;
}


The login form should be visible only to anonymous users. Logged in users should not see it, since they already logged in, but the 'access callback' =&gt; TRUE line is making it accessible to every user, contrary to what Drupal (correctly) does.