#16444 closed defect (bug) (fixed)
add_user_to_blog() and remove_user_from_blog() can break the switch_to_blog() stack
Reported by: | mdawaffe | Owned by: | markjaquith |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | 3.0.1 |
Component: | Users | Keywords: | has-patch dev-feedback |
Focuses: | Cc: |
Description
Both add_user_to_blog()
and remove_user_from_blog()
call switch_to_blog()
first thing. On encountering an error, however, they can return before calling restore_current_blog()
.
See #13903
Patch attached.
Attachments (1)
Change History (7)
#1
@
14 years ago
- Keywords dev-feedback added
- Milestone changed from Awaiting Review to 3.1
- Owner set to markjaquith
- Status changed from new to accepted
#2
follow-up:
↓ 4
@
14 years ago
Looks good -- wondering if there are other places we're doing the same thing.
#4
in reply to:
↑ 2
@
14 years ago
Replying to nacin:
Looks good -- wondering if there are other places we're doing the same thing.
Just browsed through all instances of switch_to_blog and doesn't look like we're doing this anywhere else.
Note: See
TracTickets for help on using
tickets.
Straightforward fix, for what could be a tricky bug to track down if encountered. Can I get some more people to weigh in?