#33288 closed defect (bug) (invalid)
wp_set_current_user function does not interface correctly with WP_User constructor
Reported by: | jhannwong | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.0.3 |
Component: | Users | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
The fix is simple.
Line 29:
$id == $current_user->ID
If $id is a string, it evaluates to 0.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Hi jhannwong, welcome to Trac.
$id
won't necessarily evaluate to0
; we probably can't change to a strict comparison here but type juggling should handle this okay with numeric strings. Can you elaborate on what you're trying to do and what's unexpected about the result?