-
-
Notifications
You must be signed in to change notification settings - Fork 817
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#1588 Fix regression where empty string is passed to PropertyBag #16532
Conversation
We have a scenario where the checkbox is presented but is optional. This is then in 'params' which is passed through to PropertyBag. The value is equal to '' so it fails to validate when we use it to set the value on the PropertyBag. I don't think we lose anything meaningful by not setting an empty string and it avoids this error so we should merge & release as a regression fix IMHO. If we want to revist then we should do that in master https://lab.civicrm.org/dev/core/issues/1588
(Standard links)
|
I would prefer this: #16538 |
Is there ever a case when a property wants to get set to ZLS? |
is ZLS an acronym? I see Zimmermann–Laband syndrome Zero Length String? |
I would be very surprised - given where we are coming from - if the difference between NULL & '' is material for receiving functions |
merging as the discussion suggests that this is an ok way to go forward |
late reply, but yes, I meant "" for zero length string (ZLS). My bad for the TLA, IDK! LOL. |
Overview
Fixes a regression where a fatal error results when:
If you enabled the recurring option "Support recurring intervals" on a contribution page you can no longer submit the contribution form unless you enter a value for the recurring interval, even if you have not selected to make a recurring contribution.
Before
Fatal
Error: recurFrequencyInterval must be a positive integer
After
No error
Technical Details
We have a scenario where the checkbox is presented but is optional. This is then in 'params' which is passed through to
PropertyBag. The value is equal to '' so it fails to validate when we use it to set the value on the PropertyBag.
I don't think we lose anything meaningful by not setting an empty string and it avoids this error so we should
merge & release as a regression fix IMHO. If we want to revist then we should do that in master
https://lab.civicrm.org/dev/core/issues/1588
Comments
@artfulrobot @mattwire