#6884 closed defect (bug) (fixed)
Improve validation in BP_XProfile_Field_Type->is_valid()
| Reported by: | dcavins | Owned by: | dcavins |
|---|---|---|---|
| Priority: | low | Milestone: | 2.5 |
| Component: | Extended Profile | Version: | 2.4.0 |
| Severity: | minor | 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
@
10 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
@
10 years ago
- Keywords has-unit-tests added; needs-unit-tests removed
- Owner set to
- Status new → assigned
- Version → 2.4.0
#6
@
10 years ago
@dcavins are you intending this for 2.5 or not? If so, you need to commit it on Monday.
#7
@
10 years ago
- Keywords commit added
- Milestone Awaiting Review → 2.5
If you attach a patch to a ticket, please move it to the active milestone, or it'll probably get overlooked. :)
#9
@
10 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Break if any of the values in the array are not whitelisted.