? pathauto.api.php
Index: pathauto.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.test,v
retrieving revision 1.1.4.10
diff -u -p -r1.1.4.10 pathauto.test
--- pathauto.test	9 Jun 2010 02:18:17 -0000	1.1.4.10
+++ pathauto.test	9 Jun 2010 03:58:42 -0000
@@ -364,8 +364,12 @@ class PathautoTaxonomyTokenTestCase exte
       'taxonomy' => array($term1->tid, $term2->tid, $term3->tid),
     ));
 
+    $non_term_node = $this->drupalCreateNode(array('type' => 'story'));
+
     $this->assertToken('node', $node, 'termpath', $term2->name);
     $this->assertToken('node', $node, 'termalias', "category/{$this->vocab->name}/{$term2->name}");
+    $this->assertToken('node', $non_term_node, 'termpath', '');
+    $this->assertToken('node', $non_term_node, 'termalias', '');
   }
 
   function addVocabulary(array $vocabulary = array()) {
Index: pathauto.tokens.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.tokens.inc,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 pathauto.tokens.inc
--- pathauto.tokens.inc	8 Apr 2010 21:10:55 -0000	1.1.2.7
+++ pathauto.tokens.inc	9 Jun 2010 03:58:42 -0000
@@ -57,6 +57,9 @@ function _pathauto_token_values($type, $
         if ($term) {
           $values = array_merge($values, _pathauto_token_values('taxonomy', $term, $options, 'term'));
         }
+        else {
+          $values['termpath'] = $values['termpath-raw'] = $values['termalias'] = '';
+        }
       }
       break;
 
