- Issue created by @hktang
- last update
7 months ago 1 pass - 🇵🇹Portugal joaomarques736
Hello hktang,
This is fixed in the new version 4.0.5.
Thanks!
- Status changed to Fixed
7 months ago 9:50pm 27 April 2024
When I submit a webform, I received this error:
"\nAn AJAX HTTP error occurred.\nHTTP Result Code: 200\nDebugging information follows.\nPath: /webform/kian_webform/test?ajax_form=1\nStatusText: parsererror\nResponseText: \nDeprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/web/modules/contrib/webform_content_creator/src/Plugin/WebformContentCreator/FieldMapping/TextFieldMapping.php on line 85\nDeprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/web/modules/contrib/webform_content_creator/src/Plugin/WebformContentCreator/FieldMapping/TextFieldMapping.php on line 89
This is because $value passed into checkMaxFieldSizeExceeded() could be NULL.
if ($max_length < strlen($value)) {
\Drupal::logger(WebformContentCreatorInterface::WEBFORM_CONTENT_CREATOR)->notice($this->t('Problem: Field max length exceeded (truncated).'));
return $max_length;
}
In checkMaxFieldSizeExceeded(), return 0 if $value is empty.
Fixed
4.0
Code
Hello hktang,
This is fixed in the new version 4.0.5.
Thanks!