The logic in HTMLMultiSelectField::getInputOOUI
if ( !$hasSections ) { // Directly return the only OOUI\CheckboxMultiselectInputWidget. // This allows it to be made infusable and later tweaked by JS code. return $out[ 0 ]; }
points to a nonexisting element if no defaults are selected and the list is empty (there is no 0-th element). This generates a warning, which might generate output... Maybe this should become a test case for this class...