| 5 common.inc | drupal_not_found() |
| 6 common.inc | drupal_not_found() |
| 7 common.inc | drupal_not_found() |
| 8 common.inc | drupal_not_found() |
Generates a 404 error if the request can not be handled.
15 calls to drupal_not_found()
File
- includes/
common.inc, line 202 - Common functions that many Drupal modules will need to reference.
Code
function drupal_not_found() {
drupal_set_header('HTTP/1.0 404 Not Found');
watchdog('page not found', t('%page not found.', array('%page' => theme('placeholder', $_GET['q']))), WATCHDOG_WARNING);
$path = drupal_get_normal_path(variable_get('site_404', ''));
$status = MENU_NOT_FOUND;
if ($path && $path != $_GET['q']) {
menu_set_active_item($path);
$status = menu_execute_active_handler();
}
if ($status != MENU_FOUND) {
drupal_set_title(t('Page not found'));
print theme('page', '');
}
}
Login or register to post comments