- Issue created by @nubeli
- Status changed to RTBC
over 1 year ago 7:45am 23 July 2023 - Status changed to Fixed
over 1 year ago 8:32am 30 July 2023 Automatically closed - issue fixed for 2 weeks with no activity.
1.0 Problem/Motivation
Getting error:
Trying to access array offset on value of type null WebformCivicrmPostProcess.php:167
In WebformCivicrmPostProcess::modifyWebSubmissionData()
it attempts to get the element for a given key based on submission data, and then attempts to use the $element without checking that it exists.
But I found it's possible that there is no longer such an element no longer exists but the previous submissions are still there. I'm guessing in normal conditions the UI would clean up the previous submissions but it's no guarantee.
2.0 Detailed steps to reproduce (embed screenshots)
I'm getting this error when using webform_civicrm_migrate to migrate submissions from Drupal 7 to Drupal 9.
3.0 Proposed resolution
Skip the $element if it's NULL since it's obviously not a 'civicrm_options' type.
Fixed
6.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.