? drupalhead.kpf
Index: /Applications/MAMP/htdocs/drupalhead/modules/path/path.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.module,v
retrieving revision 1.142
diff -u -p -r1.142 path.module
--- modules/path/path.module	23 Apr 2008 20:01:53 -0000	1.142
+++ modules/path/path.module	4 May 2008 15:21:24 -0000
@@ -134,9 +134,11 @@ function path_nodeapi(&$node, $op, $arg)
     $language = isset($node->language) ? $node->language : '';
     switch ($op) {
       case 'validate':
-        $node->path = trim($node->path);
-        if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE dst = '%s' AND src != '%s' AND language = '%s'", $node->path, "node/$node->nid", $language))) {
-          form_set_error('path', t('The path is already in use.'));
+        if (isset($node->path)) {
+          $node->path = trim($node->path);
+          if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE dst = '%s' AND src != '%s' AND language = '%s'", $node->path, "node/$node->nid", $language))) {
+            form_set_error('path', t('The path is already in use.'));
+          }
         }
         break;
 
