veda-consulting-company / uk.co.vedaconsulting.gdpr

Other
11 stars 55 forks source link

PHP 8 fix when contact doesn't exist #326

Closed MegaphoneJon closed 1 year ago

MegaphoneJon commented 1 year ago

When submitting "Update Comms Preferences" on a contact that doesn't currently exist, this error appears:

TypeError: array_fill_keys(): Argument #1 ($keys) must be of type array, string given in array_fill_keys() (line 523 of /mysite/web/sites/all/civicrm-custom/extensions/uk.co.vedaconsulting.gdpr/CRM/Gdpr/CommunicationsPreferences/Utils.php)

That's because of stricter PHP type checking in PHP8, this is a fix.

rajeshrhino commented 1 year ago

Fixed in #312