Two variables in function I know this is my fault and lack of knowledge of php . Sorry about this .
I have a function in my template.php .  

/**
 * Implements THEME_preprocess_node().
 */
function salamat_preprocess_node(&amp;$vars) {

    if ($vars['node']-&gt;type == 'article') {
        // Remove Add comment link from teaser.
        unset($vars['content']['links']['comment']['#links']['comment-add']);

        // Remove login/register to comment link.
        unset($vars['content']['links']['comment']['#links']['comment_forbidden']);

  }    
}


When i want to add a variable like &amp;$variables to function , it does'nt work .  

/**
 * Implements THEME_preprocess_node().
 */
function salamat_preprocess_node(&amp;$variables, &amp;$vars) {

    if ($vars['node']-&gt;type == 'article') {
        // Remove Add comment link from teaser.
        unset($vars['content']['links']['comment']['#links']['comment-add']);

        // Remove login/register to comment link.
        unset($vars['content']['links']['comment']['#links']['comment_forbidden']);
  }


    if($variables['view_mode'] == 'teaser') {

        $variables['theme_hook_suggestions'][] = 'node__'.$variables['type'].'__teaser';
        $variables['theme_hook_suggestions'][] = 'node__'.$variables['nid'].'__teaser';
        $temp = drupal_get_query_parameters();
        if(isset($temp['show_mode']) ) {
            $variables['theme_hook_suggestions'][] = 'node__'.$variables['type'].'__teaser__'.$temp['show_mode'];
            $variables['theme_hook_suggestions'][] = 'node__'.$variables['nid'].'__teaser__'.$temp['show_mode'];
        }
    }

}


Any advice ?
The $variables argument is passed by reference so you can name it whatever you want. There are two common conventions in Drupal for $variables in hook_preprocess functions:


Name it $vars
Name it $variables


I suspect you found some code that you want to use that used $variables; but your existing preprocess function uses $vars. Simply change the references to $variables to $vars in your code above and remove the $variables argument:

/**
 * Implements THEME_preprocess_node().
 */
function salamat_preprocess_node(&amp;$vars) {

  if ($vars['node']-&gt;type == 'article') {
    // Remove Add comment link from teaser.
    unset($vars['content']['links']['comment']['#links']['comment-add']);
    // Remove login/register to comment link.
    unset($vars['content']['links']['comment']['#links']['comment_forbidden']);
  }

  if($vars['view_mode'] == 'teaser') {
    $vars['theme_hook_suggestions'][] = 'node__'.$vars['type'].'__teaser';
    $vars['theme_hook_suggestions'][] = 'node__'.$vars['nid'].'__teaser';
    $temp = drupal_get_query_parameters();
    if(isset($temp['show_mode']) ) {
      $vars['theme_hook_suggestions'][] = 'node__'.$vars['type'].'__teaser__'.$temp['show_mode'];
      $vars['theme_hook_suggestions'][] = 'node__'.$vars['nid'].'__teaser__'.$temp['show_mode'];
    }
  }
}