Commit 2c912063 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#84754: fix 404 and 403 error pages if the path set for these error pages does not exist

parent c856eac1
...@@ -352,9 +352,9 @@ function drupal_not_found() { ...@@ -352,9 +352,9 @@ function drupal_not_found() {
$return = menu_execute_active_handler($path); $return = menu_execute_active_handler($path);
} }
if (empty($return)) { if (empty($return) || $return == MENU_NOT_FOUND || $return == MENU_ACCESS_DENIED) {
drupal_set_title(t('Page not found')); drupal_set_title(t('Page not found'));
$return = ''; $return = t('The requested page could not be found.');
} }
// To conserve CPU and bandwidth, omit the blocks. // To conserve CPU and bandwidth, omit the blocks.
...@@ -381,7 +381,7 @@ function drupal_access_denied() { ...@@ -381,7 +381,7 @@ function drupal_access_denied() {
$return = menu_execute_active_handler($path); $return = menu_execute_active_handler($path);
} }
if (empty($return)) { if (empty($return) || $return == MENU_NOT_FOUND || $return == MENU_ACCESS_DENIED) {
drupal_set_title(t('Access denied')); drupal_set_title(t('Access denied'));
$return = t('You are not authorized to access this page.'); $return = t('You are not authorized to access this page.');
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment