- Issue created by @Aneida
- Status changed to Fixed
5 months ago 6:56pm 3 July 2024 Automatically closed - issue fixed for 2 weeks with no activity.
When using the Rut component in Webform and not specifying a 'message_js', warnings appear.
Warnings:
Warning: Undefined array key "#message_js" en Drupal\rut\Element\RutField::processRutElementForm() (línea 66 de /var/www/html/web/modules/contrib/rut/src/Element/RutField.php)
Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated en Drupal\rut\Element\RutField::processRutElementForm() (línea 66 de /var/www/html/web/modules/contrib/rut/src/Element/RutField.php)
Ajust line
$message = trim($element['#message_js']) != '' ? $element['#message_js'] : t('Invalid Rut');
to
$message = isset($element['#message_js']) && trim($element['#message_js']) != '' ? trim($element['#message_js']) : t('Invalid Rut');
Fixed
1.10
Code
Automatically closed - issue fixed for 2 weeks with no activity.