Closed seamuslee001 closed 1 year ago
I have tested on my local setup and agree with the fixes made. @elisseck can you please take look at this patch?
Thanks! Sorry I haven't seen these. My assumption was that everyone has moved to using https://lab.civicrm.org/extensions/formprotection where matt included most of the relevant code from this extension plus new features.
This fixes a type error on a clients site running PHP8.0 the issue is that if you leave the say honeypot_form_ids settings black Civi::settings() will supply the default which is null and there for an array_key_exists and CRM_Utils_Array::value will supply the setting default value of NULL instead of []
This uses the ?? operator to ensure an array is passed through
Example settings array that was causing the issue var_dumped out