The fix in #2905907: Notice: Uninitialized string offset: 0 in Drupal\Core\Render\Element::property() (line 27 of /var/www/html/core/lib/Drupal/Core/Render/Element.php) was only applied to validateFormRecursive(). I am still getting that error, but now it is on the submit function which uses similar code to what was replaced in the validate function.
Error:
Notice: Uninitialized string offset: 0 in Drupal\Core\Render\Element::property() (line 27 of core/lib/Drupal/Core/Render/Element.php)
#0 core/includes/bootstrap.inc(584): _drupal_error_handler_real()
#1 core/lib/Drupal/Core/Render/Element.php(27): _drupal_error_handler()
#2 modules/contrib/webform/src/WebformSubmissionConditionsValidator.php(265): Drupal\Core\Render\Element::property('')
#3 modules/contrib/webform/src/WebformSubmissionConditionsValidator.php(245): Drupal\webform\WebformSubmissionConditionsValidator->submitFormRecursive(Array, Object(Drupal\webform\Entity\WebformSubmission), Array)
This is addressed by making the same change in #2905907: Notice: Uninitialized string offset: 0 in Drupal\Core\Render\Element::property() (line 27 of /var/www/html/core/lib/Drupal/Core/Render/Element.php) to submitFormRecursive()
if (Element::property($key) || !is_array($element)) {
continue;
}to
if (Element::child($key) || !is_array($element)) {
continue;
}patch forthcoming -
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 2999765-6.patch | 11.21 KB | jrockowitz |
| #5 | 2999765-5.patch | 5.48 KB | jrockowitz |
| #2 | multipage_form_error-2999765-2.patch | 684 bytes | jastraat |
Comments
Comment #2
jastraat commentedSuggested patch attached
Comment #4
jastraat commentedQuick mention that this error is with Drupal 8.6.1, so it may not exist in sites running Drupal 8.5.x
Comment #5
jrockowitz commentedWe might want to try changing all instance to
(Element::property($key) || !is_array($element)…to…
(!Element::child($key) || !is_array($element)Comment #6
jrockowitz commentedThe next step is going to be moving all calls to
(!Element::child($key) || !is_array($element))to a new WebformElement::isElement method.Comment #7
jrockowitz commentedComment #9
jrockowitz commented@jastraat Thanks for the initial patch. I committed the final patch. Please download the latest dev release to review.