Commit 33cf3462 authored by Miguel Guerreiro's avatar Miguel Guerreiro
Browse files

Issue #3272179: PHP 8.1: Deprecated function: preg_match(): Passing null to...

Issue #3272179: PHP 8.1: Deprecated function: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in _node_special_character_form_validate()
parent 1176251b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ function _node_special_character_form_validate($form, $form_state) {
  if (preg_match('/[\'^£$%&*()}{@#~?><>,|=_+¬]/', $form_state->getValue('body_class')[0]['value'])) {
    $form_state->setErrorByName('body_class', 'Special character in Custom Body Class');
  }
  if (preg_match('/[\'^£$%&*()}{@#~?><>,|=_+¬]/', $form_state->getValue('nodetype_class'))) {
  if (preg_match('/[\'^£$%&*()}{@#~?><>,|=_+¬]/', $form_state->getValue('nodetype_class', ''))) {
    $form_state->setErrorByName('nodetype_class', 'Special character in Custom Body Class Settings');
  }
}