Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If test.names
in the webform settings is empty, $this->names
in WebformSubmissionGenerate.php
will return NULL
:
$this->names = Yaml::decode($this->configFactory->get('webform.settings')->get('test.names') ?: '');
This results in a PHP warning WARNING Invalid argument supplied for foreach()
on the foreach ($this->names as $key => $values) {...}
in the same file.
Comment | File | Size | Author |
---|---|---|---|
#4 | 3193872-4.patch | 837 bytes | jrockowitz |
| |||
#2 | webformsubmissiongenerate_invalid_argument_names-3193872-2.patch | 699 bytes | matthiasm11 |
Comments
Comment #2
matthiasm11 CreditAttribution: matthiasm11 at MM-Experience commentedPatch attached.
Comment #3
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThis should also be fixed 8.x-5.x
Comment #4
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedSlightly different approach.
Comment #5
matthiasm11 CreditAttribution: matthiasm11 at MM-Experience commentedThat will work too, thanks for your quick response!
Comment #8
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented