dev/financial#171 - False INTL warning when adding a price field #19929
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
https://lab.civicrm.org/dev/financial/-/issues/171#note_56522
Before
False warning about missing INTL extension.
Hidden php type error.
Row doesn't autofill.
After
Good.
Technical Details
The field allows both null and 0. A blank gets stored as null, but then is_numeric is false when it tries to round it and the INTL message comes up when is_numeric is false. There's also then a type error which causes the ajax call to 500, so it doesn't autofill.
Comments
The second change is something not used at this point on the form but is clearly wrong and gives its own warning. It's been like that for about 8 years.