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.