Error when trying to save hubspot handle form

Created on 27 March 2023, over 1 year ago

Problem/Motivation

After I put all the settings on the Hubspot handler, I can't submit and get this error:

Warning: Undefined array key "mapping"in /app/src/web/modules/contrib/hubspot/src/Plugin/WebformHandler/HubspotWebformHandler.php on line 629[

Steps to reproduce

  1. Select 1 webform already created
  2. Go to "Settings" -> "Emails/Handles"
  3. Click on "Add handler", configure all the fields and when I try to save, I get the error message

Proposed resolution

Change line 629 on HubspotWebformHandler.php from:

$settings['subscriptions'] = $form_values['subscriptions']['mapping'];

to:

$settings['subscriptions'] = $form_values['subscriptions']['mapping'] ?? [];

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇵🇹Portugal guilherme-lima-almeida Lisbon

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024