Index: pathauto.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.inc,v
retrieving revision 1.40
diff -u -p -r1.40 pathauto.inc
--- pathauto.inc	25 May 2008 21:17:17 -0000	1.40
+++ pathauto.inc	26 May 2008 16:23:06 -0000
@@ -199,10 +199,8 @@ function pathauto_cleanstring($string, $
 
     // Replace multiple separators with a single one
     $output = preg_replace("/$seppattern+/", "$separator", $output);
-
   }
 
-
   // Enforce the maximum component length
   $maxlength = min(variable_get('pathauto_max_component_length', 100), 128);
   $output = drupal_substr($output, 0, $maxlength);
Index: pathauto.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.module,v
retrieving revision 1.110
diff -u -p -r1.110 pathauto.module
--- pathauto.module	20 May 2008 18:09:08 -0000	1.110
+++ pathauto.module	26 May 2008 16:23:07 -0000
@@ -222,13 +222,14 @@ function pathauto_nodeapi(&$node, $op, $
       case 'insert':
       case 'update':
         // Get the specific pattern or the default
+        $pattern = '';
         if (!empty($node->language)) {
-          $pattern = variable_get('pathauto_node_'. $node->type .'_'. $node->language .'_pattern', FALSE);
+          $pattern = trim(variable_get('pathauto_node_'. $node->type .'_'. $node->language .'_pattern', ''));
         }
-        if (!trim($pattern)) {
-          $pattern = variable_get('pathauto_node_'. $node->type .'_pattern', FALSE);
-          if (!trim($pattern)) {
-            $pattern = variable_get('pathauto_node_pattern', FALSE);
+        if (!$pattern) {
+          $pattern = trim(variable_get('pathauto_node_'. $node->type .'_pattern', ''));
+          if (!$pattern) {
+            $pattern = trim(variable_get('pathauto_node_pattern', ''));
           }
         }
         // Only do work if there's a pattern
@@ -262,14 +263,15 @@ function pathauto_form_alter(&$form, $fo
   // Only do this for node forms
   if (isset($form['#id']) && ($form['#id'] == 'node-form') && arg(0) == 'node') {
     // See if there is a pathauto pattern or default applicable
+    $pattern = '';
     if (isset($form['language'])) {
       $language = isset($form['language']['#value']) ? $form['language']['#value'] : $form['language']['#default_value'];
-      $pattern = variable_get('pathauto_node_'. $form['type']['#value'] .'_'. $language .'_pattern', FALSE);
+      $pattern = trim(variable_get('pathauto_node_'. $form['type']['#value'] .'_'. $language .'_pattern', ''));
     }
-    if (!trim($pattern)) {
-      $pattern = variable_get('pathauto_node_'. $form['type']['#value'] .'_pattern', FALSE);
-      if (!trim($pattern)) {
-        $pattern = variable_get('pathauto_node_pattern', FALSE);
+    if (!$pattern) {
+      $pattern = trim(variable_get('pathauto_node_'. $form['type']['#value'] .'_pattern', ''));
+      if (!$pattern) {
+        $pattern = trim(variable_get('pathauto_node_pattern', ''));
       }
     }
     // If there is a pattern AND the user is allowed to create aliases AND the path textbox is present on this form
@@ -412,7 +414,6 @@ function pathauto_user($op, &$edit, &$us
       path_set_alias('blog/'. $user->uid .'/feed');
       path_set_alias('user/'. $user->uid .'/track');
       path_set_alias('user/'. $user->uid .'/track/feed');
-
       break;
     default:
       break;
Index: pathauto_node.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto_node.inc,v
retrieving revision 1.44
diff -u -p -r1.44 pathauto_node.inc
--- pathauto_node.inc	20 May 2008 18:09:08 -0000	1.44
+++ pathauto_node.inc	26 May 2008 16:23:07 -0000
@@ -52,7 +52,6 @@ function node_pathauto($op) {
  * Generate aliases for all nodes without aliases.
  */
 function node_pathauto_bulkupdate() {
-
   // From all node types, only attempt to update those with patterns
   $pattern_types = array();
 
Index: pathauto_taxonomy.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto_taxonomy.inc,v
retrieving revision 1.36
diff -u -p -r1.36 pathauto_taxonomy.inc
--- pathauto_taxonomy.inc	24 May 2008 08:58:58 -0000	1.36
+++ pathauto_taxonomy.inc	26 May 2008 16:23:07 -0000
@@ -52,15 +52,15 @@ function taxonomy_pathauto_bulkupdate() 
   $vid_where = '';
   foreach (taxonomy_get_vocabularies() as $vid => $info) {
     $pattern = '';
-    $pattern = variable_get('pathauto_taxonomy_'. $vid .'_pattern', '');
+    $pattern = trim(variable_get('pathauto_taxonomy_'. $vid .'_pattern', ''));
 
     // If it's not set, check the default
     // TODO - if there's a default we shouldn't do this crazy where statement because all vocabs get aliases
     // TODO - special casing to exclude the forum vid (and the images vid and...?)
-    if (!trim($pattern)) {
-      $pattern = variable_get('pathauto_taxonomy_pattern', '');
+    if (!$pattern) {
+      $pattern = trim(variable_get('pathauto_taxonomy_pattern', ''));
     }
-    if (trim($pattern)) {
+    if ($pattern) {
       $pattern_vids[] = $vid;
       if (!trim($vid_where)) {
         $vid_where = " AND (vid = '%s' ";
