Opened 15 months ago

Last modified 10 days ago

#20043 new defect (bug)

WP_User missing magic __unset() method

Reported by: johnjamesjacoby 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)

20043.patch (689 bytes) - added by johnjamesjacoby 15 months ago.

Download all attachments as: .zip

Change History (11)

  • Description modified (diff)
  • Cc djpaul@… added
  • Milestone changed from Awaiting Review to 3.4

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

What, no unit tests? ;-)

  • Cc kpayne@… added

Ask and ye shall receive [UT618]

  • Milestone changed from 3.4 to Future Release
  • 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.)

  • Milestone changed from 3.6 to Future Release
Note: See TracTickets for help on using tickets.