#209584 by Rob Loach: 404/403 validation is also done in runtime so to allow more flexibility here, remove the submission time validation
parent
1b2ce46df2
commit
50dbab928f
|
@ -1217,26 +1217,9 @@ function system_error_reporting_settings() {
|
||||||
'#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.')
|
'#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.')
|
||||||
);
|
);
|
||||||
|
|
||||||
$form['#validate'][] = 'system_error_reporting_settings_validate';
|
|
||||||
|
|
||||||
return system_settings_form($form);
|
return system_settings_form($form);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Validate the submitted error reporting form.
|
|
||||||
*/
|
|
||||||
function system_error_reporting_settings_validate($form, &$form_state) {
|
|
||||||
// Validate paths to 403 and 404 error pages.
|
|
||||||
$item = array('link_path' => $form_state['values']['site_403']);
|
|
||||||
if (!empty($item['link_path']) && !menu_valid_path($item)) {
|
|
||||||
form_set_error('site_403', t("The path '@path' is either invalid or you do not have access to it.", array('@path' => $item['link_path'])));
|
|
||||||
}
|
|
||||||
$item = array('link_path' => $form_state['values']['site_404']);
|
|
||||||
if (!empty($item['link_path']) && !menu_valid_path($item)) {
|
|
||||||
form_set_error('site_404', t("The path '@path' is either invalid or you do not have access to it.", array('@path' => $item['link_path'])));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Menu callback; Menu page for the various logging options.
|
* Menu callback; Menu page for the various logging options.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue