diff --git a/drupal/sites/all/modules/contrib/pathauto/pathauto.inc b/drupal/sites/all/modules/contrib/pathauto/pathauto.inc
index 1f4f506..9e457ba 100644
--- a/pathauto.inc
+++ b/pathauto.inc
@@ -448,7 +448,7 @@ function _pathauto_set_alias($source, $alias, $pid = NULL, $verbose = FALSE, $ol
 
   // Skip replacing the current alias with an identical alias
   if ($old_alias != $alias) {
-    $path = array('source' => $source, 'alias' => $alias, 'pid' => $pid, 'language' => $language);
+    $path = array('source' => $source, 'alias' => $alias, 'pid' => $pid, 'language' => ($language?$language:LANGUAGE_NONE));
     path_save($path);
 
 
