Commit 1b13d724 authored by Nicolas Ricklin's avatar Nicolas Ricklin Committed by Sascha Grossenbacher
Browse files

Issue #3264294 by Aerzas: PHP 8.1 deprecation in token_element_validate

parent 3d7b3043
Loading
Loading
Loading
Loading
+1 −1
Changes for token.module: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ function _token_module($type, $name) {
function token_element_validate($element, FormStateInterface $form_state) {
  $value = isset($element['#value']) ? $element['#value'] : $element['#default_value'];

  if (!mb_strlen($value)) {
  if (empty($value)) {
    // Empty value needs no further validation since the element should depend
    // on using the '#required' FAPI property.
    return $element;