missed that in https://github.com/matomo-org/matomo/pull/18309
Are those probably required here as well? https://github.com/matomo-org/matomo/blob/c4431ba/libs/HTML/QuickForm2/Element/Select.php#L63-L69
@sgiehl were you able to reproduce this issue? I have been unsuccessful, even calling
$form->getElementsByName() directly doesn't give any error for me in PHP8.1.
The changes look fine but it'd be good to see them fix an actual issue that I can repro 😝
Actually I couldn't. Those I could reproduce were already fixed in another PR.
I'm not sure how it could have happened, but Matomo v4.6.2 has now been released without this commit. Ah, I see now the v4.7.0 milestone, just wondering why since this is a trivial but effective fix without any backwards compatibility issues 🤔. However, I'll re-apply it again manually.