summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/common.inc6
-rw-r--r--modules/system/system.admin.inc18
2 files changed, 14 insertions, 10 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 91bed1d05..c2a22c899 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -797,8 +797,10 @@ function _drupal_log_error($error, $fatal = FALSE) {
$number++;
}
- // Force display of error messages in update.php.
- if (variable_get('error_level', 1) == 1 || (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update')) {
+ // Force display of error messages in update.php or if the proper error
+ // reporting level is set.
+ $error_level = variable_get('error_level', 2);
+ if ($error_level == 2 || ($error_level == 1 && $type != 'Notice') || (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update')) {
drupal_set_message(t('%type: %message in %function (line %line of %file).', $error), 'error');
}
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 8b1c2f0b3..5dd489b0d 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -1257,7 +1257,6 @@ function system_site_information_settings_validate($form, &$form_state) {
* @see system_settings_form()
*/
function system_error_reporting_settings() {
-
$form['site_403'] = array(
'#type' => 'textfield',
'#title' => t('Default 403 (access denied) page'),
@@ -1266,7 +1265,6 @@ function system_error_reporting_settings() {
'#description' => t('This page is displayed when the requested document is denied to the current user. If unsure, specify nothing.'),
'#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q=')
);
-
$form['site_404'] = array(
'#type' => 'textfield',
'#title' => t('Default 404 (not found) page'),
@@ -1275,15 +1273,19 @@ function system_error_reporting_settings() {
'#description' => t('This page is displayed when no other content matches the requested document. If unsure, specify nothing.'),
'#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q=')
);
-
$form['error_level'] = array(
- '#type' => 'select', '#title' => t('Error reporting'),
- '#default_value' => 1,
- '#options' => array(t('Write errors to the log'), t('Write errors to the log and to the screen')),
- '#description' => t('Specify where Drupal, PHP and SQL errors are logged. While it is recommended that a site running in a production environment write errors to the log only, in a development or testing environment it may be helpful to write errors both to the log and to the screen.')
+ '#type' => 'radios',
+ '#title' => t('Error reporting'),
+ '#default_value' => 2,
+ '#options' => array(
+ 0 => t('Site in production: do not display any errors.'),
+ 1 => t('Site in development: display functional errors only.'),
+ 2 => t('For developers: display all errors.'),
+ ),
+ '#description' => t('Display settings for error messages. Note that all error messages are always logged.'),
);
- return system_settings_form($form, TRUE);
+ return system_settings_form($form);
}
/**