Noticed this while using sfweb2lead_webform module - it doesn't define 'messages' or 'message' in its configuration for an SalesforceWebToLeadPostWebformHandler object (which overrides RemotePostWebformHandler), causing warnings in the log.
Notice: Undefined index: messages in Drupal\webform\Plugin\WebformHandler\RemotePostWebformHandler->getCustomResponseMessage() (line 1079 of /var/www/drupal/web/modules/contrib/webform/src/Plugin/WebformHandler/RemotePostWebformHandler.php)
Warning: Invalid argument supplied for foreach() in Drupal\webform\Plugin\WebformHandler\RemotePostWebformHandler->getCustomResponseMessage() (line 1079 of /var/www/drupal/web/modules/contrib/webform/src/Plugin/WebformHandler/RemotePostWebformHandler.php)
As far as I can tell, a child class isn't "required" to set or override these parameters. The existence of 'message' is checked for, but 'messages' is not. The attached patch fixes this assumption.
Comment | File | Size | Author |
---|---|---|---|
#3 | 3137625-3.patch | 1.11 KB | jrockowitz |
| |||
#2 | 3137625-2.patch | 0 bytes | jrockowitz |
webform_undef_fix.patch | 907 bytes | cpigott | |
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedHere is one minor tweak.
Comment #3
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented