2

I have started to get this error on a few contribution pages Warning: in_array() expects parameter 2 to be array, null given in /civicrm/CRM/Core/BAO/CustomField.php on line 1241

I think it started when I upgraded from 5.25.x to 5.26 (now on 5.26.1).

Looking at the error message, log, and similar reports, I think I have tracked it down to a custom checkbox field that had a single option but no default value was set.

When I set a default value the error message disappeared. When I unset the default the error didn't return though I am unsure if that is a permanent fix.

Just in case I have also upgraded to 5.26.2 and the error has not returned.

2
  • Question, I have the same error message. How did you find out which custom checkbox was causing the error?
    – CreativeA
    Commented Oct 6, 2020 at 15:16
  • It was down to a process of elimination, checking which profiles were used by the contribution page, and then what custom fields were being used in the profiles. As it was an array error I narrowed it down to anything that could have had multiple values, which helped speed up the process and thankfully I didn't have may profiles or custom fields to go through. Commented Oct 6, 2020 at 18:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.