Opened 15 months ago
Last modified 10 days ago
#20043 new defect (bug)
WP_User missing magic __unset() method
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Users | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | djpaul@…, kpayne@… |
Description (last modified by johnjamesjacoby)
When the magic methods were put into WP_User in 3.3, __unset() was skipped. This has the result of unset( $user_data->$foo ); not actually doing anything.
Patched against r19926.
Attachments (1)
Change History (11)
johnjamesjacoby — 15 months ago
- Description modified (diff)
In here would work: http://unit-tests.trac.wordpress.org/browser/wp-testcase/test_user.php#L140
comment:8
johnjamesjacoby — 5 months ago
- Milestone changed from Future Release to 3.6
Patch and unit test. Moving into 3.6 for consideration.
I'm fine with this, but what's the use case? Other than a change in behavior from a year ago. I'm curious because I'm not sure we should easily allow the unsetting of core properties if we can avoid it. (Doesn't matter, just playing devil's advocate.)
comment:10
ryan — 10 days ago
- Milestone changed from 3.6 to Future Release
Note: See
TracTickets for help on using
tickets.

Well, since we have __set(), I guess it's fair to have __unset() too.