Loading
Issue #3625825: fix bug in FreeText.php
Closes #3625825
- A Drupal text_format element requires #default_value to be a string.
- For a new answer, this code supplies an empty array. For an existing formatted answer, LMS stores an array containing value and format, so the full saved array was being passed as the default value.
- Drupal’s editor XSS preprocessing eventually passes that array to strlen(), producing the fatal error.
Code added to
- Normalize the saved answer or empty array into a string before building the element.