- Issue created by @jkingsnorth
- 🇬🇧United Kingdom jkingsnorth
1.0 Problem/Motivation
When a user has access to view webform submissions, but not edit or delete them, there is a fatal error on the 'Results' page:
TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in preg_match() (line 585 of /var/aegir/platforms/alumni-staging/sites/alumni.staging.drupal.uis.cam.ac.uk/modules/contrib/webform_civicrm/webform_civicrm.module).
This is because the data is in a property of an array, rather than a string, when they don't have edit access.
2.0 Detailed steps to reproduce (embed screenshots)
- Create a CiviCRM webform with some submissions
- Give another user submission view but not edit access
- As the other user, try to view the webform results
3.0 Proposed resolution
Pull out the string if we find an array format instead.
Needs review
5.0
Code