#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 |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | Users | Version: | 3.0.1 |
| Severity: | normal | Keywords: | has-patch dev-feedback |
| Cc: | Focuses: |
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
@
16 years ago
- Keywords dev-feedback added
- Milestone Awaiting Review → 3.1
- Owner set to
- Status new → accepted
#2
follow-up:
↓ 4
@
16 years ago
Looks good -- wondering if there are other places we're doing the same thing.
#4
in reply to: ↑ 2
@
16 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?