Index: includes/path.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/path.inc,v retrieving revision 1.65 diff -u -p -r1.65 path.inc --- includes/path.inc 16 Jul 2010 02:51:44 -0000 1.65 +++ includes/path.inc 17 Jul 2010 23:03:50 -0000 @@ -127,6 +127,7 @@ function drupal_lookup_path($action, $pa // isn't a path that has this alias elseif ($action == 'source' && !isset($cache['no_source'][$path_language][$path])) { // Look for the value $path within the cached $map + $source = FALSE; if (!isset($cache['map'][$path_language]) || !($source = array_search($path, $cache['map'][$path_language]))) { // Get the most fitting result falling back with alias without language if ($source = db_query("SELECT source FROM {url_alias} WHERE alias = :alias AND language IN (:language, :language_none) ORDER BY language DESC, pid DESC", array( @@ -135,7 +136,6 @@ function drupal_lookup_path($action, $pa ':language_none' => LANGUAGE_NONE)) ->fetchField()) { $cache['map'][$path_language][$source] = $path; - return $source; } else { // We can't record anything into $map because we do not have a valid @@ -144,6 +144,7 @@ function drupal_lookup_path($action, $pa $cache['no_source'][$path_language][$path] = TRUE; } } + return $source; } }