#10632 closed defect (bug) (invalid)
update_usermeta should allow blank values
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 2.8.4 |
| Severity: | normal | Keywords: | 2nd-opinion, has-patch |
| Cc: |
Description
I think it would be better if update_usermeta was allowed to insert '0' or blank values, instead of deleting them. First of all, if I wanted to delete the value, I would have called delete_usermeta. Second of all, update_post_meta allows it, so why not update_usermeta?
Attachments (2)
Change History (7)
comment:1
jfarthing84 — 4 years ago
- Owner set to jfarthing84
- Status changed from new to accepted
jfarthing84 — 4 years ago
jfarthing84 — 4 years ago
comment:2
jfarthing84 — 4 years ago
comment:3
jfarthing84 — 4 years ago
- Keywords has-patch added
comment:4
jfarthing84 — 4 years ago
- Resolution set to invalid
- Status changed from accepted to closed
- Milestone Unassigned deleted
Note: See
TracTickets for help on using
tickets.

Sorry, I didn't realize on the first attachment that my code editor had converted the tabs from 6 spaces to 4, so it DIFFed the whole file. I uploaded the correct version. Instead of checking the meta value with the empty() function, just check for an empty string, that way the user meta value can be set to 0 if need be.