diff --git a/includes/common.inc b/includes/common.inc index 151135eb9cddc3e50225b4405a976a0acd239b54..6c195b8e0d1a46707df380b80f5d082e1e3f3e31 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -258,7 +258,7 @@ function drupal_not_found() { $path = drupal_get_normal_path(variable_get('site_404', '')); $status = MENU_NOT_FOUND; - if ($path) { + if ($path && $path != $_GET['q']) { menu_set_active_item($path); $return = menu_execute_active_handler(); } @@ -278,7 +278,7 @@ function drupal_access_denied() { $path = drupal_get_normal_path(variable_get('site_403', '')); $status = MENU_NOT_FOUND; - if ($path) { + if ($path && $path != $_GET['q']) { menu_set_active_item($path); $return = menu_execute_active_handler(); }