function _customerror_fetch_error in Customerror 6
Same name and namespace in other branches
- 5 customerror.module \_customerror_fetch_error()
- 7 customerror.module \_customerror_fetch_error()
Fetch error.
1 call to _customerror_fetch_error()
- customerror_page in ./
customerror.module - Displays the 403 or 404 error page.
File
- ./
customerror.module, line 33 - Enables custom 404 (not found) and 403 (access denied) pages in Drupal.
Code
function _customerror_fetch_error($error_code) {
$errors = _customerror_enum_errors();
$default_desc = t('unknown error: @error_code', array(
'@error_code' => $error_code,
));
$r = $default_desc;
foreach ($errors as $code => $desc) {
if ($error_code == $code) {
$r = $desc;
}
}
return $r;
}