-
-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#4355 - Fix crash for radio custom fields #26517
Conversation
No issue was found matching the number given in the pull request title. Please check the issue number. |
(Standard links)
|
Well that was a creative solution! What could possibly go wrong with a hard-coded assumption about how many things are in an array? |
Haha. |
ab353b2
to
7abf806
Compare
jenkins retest this please |
Wow, fun. Thanks @demeritcowboy. If I'm reading this right, the only reason for this is options per line anyways, which seems like it could be handled much more cleanly before we get to the tpl. |
Thanks everybody. |
I'm not sure why this is marked as a master-only regression - on June 12th, 5.63 should have been the rc, right? And this is present in 5.63. I think this should be backported. |
Hmm yeah I must have missed backporting this one to 5.63. The other instances look like they were backported. |
Ok added #26824 |
Overview
https://lab.civicrm.org/dev/core/-/issues/4355
Before
Using php 8. Doesn't happen in php 7.
After
Technical Details
Sooo, the $formElement variable it loops over contains both non-numeric keys, for things like the label and metadata, and numeric keys, for the option choices. The way the loop dealt with that, since it was first introduced in the 2000's, was to note that the array starts with 9 non-numeric keys, so let's skip them by counting to 9.
In #26265 it added a 10th (the change in CRM/Core/Form/Renderer).
It looks something like:
Comments
Master-only regression.
FYI @larssandergreen