diff options
-rw-r--r-- | includes/path.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/path.inc b/includes/path.inc index 75a869d48..0a791cc01 100644 --- a/includes/path.inc +++ b/includes/path.inc @@ -55,10 +55,12 @@ function drupal_lookup_path($action, $path = '') { } elseif ($count > 0 && $path != '') { if ($action == 'alias') { - if (isset($map[$path]) || array_key_exists($path, $map)) { + if (isset($map[$path])) { return $map[$path]; } - $alias = db_result(db_query("SELECT dst FROM {url_alias} WHERE src = '%s'", $path)); + if (!$alias = db_result(db_query("SELECT dst FROM {url_alias} WHERE src = '%s'", $path))) { + $alias = FALSE; + } $map[$path] = $alias; return $alias; } |