Skip to content
Snippets Groups Projects

Resolve #3500383 "Dont treat empty"

1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
@@ -203,7 +203,7 @@ class LinkCheckerAdminSettingsForm extends ConfigFormBase {
'#default_value' => $config->get('base_path'),
'#type' => 'textfield',
'#title' => $this->t('Base path'),
'#description' => $this->t('Should not start with URL scheme'),
'#description' => $this->t('Should not start with URL scheme and should not have trailing slash. For example www.example.com if the project URL is https://www.example.com'),
];
$form['general']['search_published_contents_only'] = [
@@ -466,6 +466,7 @@ class LinkCheckerAdminSettingsForm extends ConfigFormBase {
$form_state->setValue('linkchecker_ignore_response_codes', trim($form_state->getValue('linkchecker_ignore_response_codes')));
$ignore_response_codes = preg_split('/(\r\n?|\n)/', $form_state->getValue('linkchecker_ignore_response_codes'));
foreach ($ignore_response_codes as $ignore_response_code) {
$ignore_response_code = (int) trim($ignore_response_code);
if (!$this->linkCheckerResponseCodes->isValid($ignore_response_code)) {
$form_state->setErrorByName('linkchecker_ignore_response_codes', $this->t('Invalid response code %code found.', ['%code' => $ignore_response_code]));
}
Loading