Skip to content
Snippets Groups Projects
Commit 50dbab92 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#209584 by Rob Loach: 404/403 validation is also done in runtime so to allow...

#209584 by Rob Loach: 404/403 validation is also done in runtime so to allow more flexibility here, remove the submission time validation
parent 1b2ce46d
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -1217,26 +1217,9 @@ function system_error_reporting_settings() { ...@@ -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.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment