- Issue created by @meyerrob
Since PHP8 count() will now throw TypeError on invalid countable types passed to the value parameter. As $options[3] is an empty String while adding a new rule in $form['shib_auth_roles'] an error is thrown each time a new rule is ought to be added.
TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in shib_auth_edit_form() ...).
Solution: Simply check if $options[3] is not an empty String before trying to count it:
'#default_value' => ($options[3] !== "") && (count($options[3]) > 1 || (count($options[3]) == 1 && $options[3] != "")) ? $options[3] : array(),
See attached patch