error_displayable($error = NULL)
Determines whether an error should be displayed.
When in maintenance mode or when error_level is ERROR_REPORTING_DISPLAY_ALL, all errors should be displayed. For ERROR_REPORTING_DISPLAY_SOME, $error will be examined to determine if it should be displayed.
Parameters
$error: Optional error to examine for ERROR_REPORTING_DISPLAY_SOME.
Return value
TRUE if an error should be displayed.
File
- core/includes/errors.inc, line 101
- Functions for error handling.
Code
function error_displayable($error = NULL) { if (defined('MAINTENANCE_MODE')) { return TRUE; } $error_level = _drupal_get_error_level(); if ($error_level == ERROR_REPORTING_DISPLAY_ALL || $error_level == ERROR_REPORTING_DISPLAY_VERBOSE) { return TRUE; } if ($error_level == ERROR_REPORTING_DISPLAY_SOME && isset($error)) { return $error['%type'] != 'Notice' && $error['%type'] != 'Strict warning'; } return FALSE; }
Please login to continue.