duplicate taxonomy array being called I am working on a music site with a couple other programmers who have left.

We are using taxonomy terms or "tags" for each node, to determine the url/subdomain the node will be shown, on effectively creating different subdomains of content. 

There is only one debug statement in the code, and even if there was another hiding somewhere, it does not explain why it shows two different arrays from the same taxonomy on the homepage.

I use the following code to reveal what terms are associated with the node:

 $terms = array();

 foreach($node-&gt;taxonomy as $term) {    
   $terms[$term-&gt;name] = $term-&gt;name;
 }

 print 'debug:&lt;pre&gt;' . check_plain(print_r($terms , 1)) . '&lt;/pre&gt;';


I get the following output:


    debug:
    Array
    (
        [national] => national
        [nyc] => nyc
    )
    debug:
    Array
    (
        [national] => national
        [nyc] => nyc
    )


Why is it showing 2 groups of arrays from the same taxonomy? The posts are only tagged once with these two tags "national" and "nyc."

Also on any nodes tagged with only "national," "washington" shows up as well in the duplicate array. I think it may be coming from another content type because when I performed a redirect on the node, using 

unset($terms['national']);
      $value = array_shift($terms) ;
      if($region != $value) {
        $link = 'http://' . $value . '.thedelimagazine.com/' . drupal_get_path_alias("node/$node-&gt;nid", $path_language = '');
        drupal_goto($link, $query = NULL, $fragment = NULL, $http_response_code = 301);


it redirected to a different content type "CD of The Month." using term "washington" it should choose the other term in the first array; in the case above "nyc."  and go to the same node type in this case "blog,"  I performed this redirect using drupal_get_path_alias for other logic cases and it worked fine.

&lt;pre&gt;
debug:
Array
(
    [national] =&gt; national
)
debug:
Array
(
    [national] =&gt; national
    [washington] =&gt; washington
)
&lt;/pre&gt;


The debug is called inside this function

function region_filter_nodeapi(&amp;$node, $op, $a3 = NULL, $a4 = NULL) {
  /*global $user, $base_url;*/
  switch ($op) {

    case 'view':

      if( (arg(1) == 0)){ }

      else { 


The site is http://www.thedelimagazine.com.
Is this in a hook function? It's possible your hook function is being called more times than you expect which gives you your extra debug statement.