--- C:/Documents and Settings/Andre/Local Settings/Temp/TCV2590.tmp/pathauto_node.1.29.2.7.inc	Thu Apr 26 19:19:31 2007
+++ C:/WWW/drupal-contrib/contributions/modules/pathauto/pathauto_node.inc	Wed Jun 27 03:26:06 2007
@@ -159,17 +159,19 @@
     $first_term_id = FALSE;
     // We loop through the array assuming it's in wheigh order, which is false, but close enough TODO: fix that
     
     // I'd use more descriptive variables, but the content isn't always a tid
     foreach ($node->taxonomy as $key => $value) { 
+      if (is_object($value)){
+        $value = (array) $value;
+      }
       if ($key === 'tags') { 
         // It's a freetag so make sure that there is a value in the array
         // Shamelessly stolen from taxonomy_node_save - most of it should be refactored out of that
         // So it can be easily reused, but until then: copy-paste-antipattern here we come!
-        
-        $typed_input = $value;
-        foreach ((array)$typed_input as $vid => $vid_value) {
+        $value = (array) $value;
+        foreach ($value as $vid => $vid_value) {
           if ($first_term_id) break;
           // This regexp allows the following types of user input:
           // this, "somecmpany, llc", "and ""this"" w,o.rks", foo bar
           $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x';
           preg_match_all($regexp, $vid_value, $matches);
