#6884 closed defect (bug) (fixed)
Improve validation in BP_XProfile_Field_Type->is_valid()
Reported by: | dcavins | Owned by: | dcavins |
---|---|---|---|
Milestone: | 2.5 | Priority: | low |
Severity: | minor | Version: | 2.4.0 |
Component: | Extended Profile | Keywords: | has-patch has-unit-tests commit |
Cc: | dcavins |
Description
When checking against a set of whitelisted values, the foreach in is_valid()
doesn't break when it encounters an invalid value. Instead, it returns the validity of the last value in the array.
Attachments (2)
Change History (12)
#4
@
9 years ago
Specifically, the test needs to answer why the current tests for the XProfile Field Types do not catch this problem -- are those tests badly written? etc.
#5
@
9 years ago
- Keywords has-unit-tests added; needs-unit-tests removed
- Owner set to dcavins
- Status changed from new to assigned
- Version set to 2.4.0
#6
@
9 years ago
@dcavins are you intending this for 2.5 or not? If so, you need to commit it on Monday.
#7
@
9 years ago
- Keywords commit added
- Milestone changed from Awaiting Review to 2.5
If you attach a patch to a ticket, please move it to the active milestone, or it'll probably get overlooked. :)
#9
@
9 years ago
Thanks @DJPaul . I wasn't thinking this was important enough to slip in after the first beta. But, it's also minor enough that slipping it in is no big deal. Thanks for the nudge.
Break if any of the values in the array are not whitelisted.