#26065 closed defect (bug) (fixed)
update_plugins transient not properly updated when multiple plugins are deleted
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.8 | Priority: | normal |
Severity: | normal | Version: | 2.8 |
Component: | Plugins | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
In delete_plugins()
, the update_plugins
transient is updated, but only the last plugin deleted is removed. Abridged code:
foreach ( $plugins as $plugin_file ) { /* ... */ } if ( $current = get_site_transient('update_plugins') ) { unset( $current->response[ $plugin_file ] ); set_site_transient('update_plugins', $current); }
The unset()
should be performed for each deleted plugin. Patch forthcoming.
Attachments (1)
Change History (8)
#5
@
12 years ago
- Owner set to dd32
- Resolution set to fixed
- Status changed from new to closed
In 26262:
#6
@
12 years ago
This seems like a lot of work — would it be easier to just wipe the entire transient with wp_clean_plugins_cache()? That'll also wipe the get_plugins() cache, which probably couldn't hurt.
#7
@
12 years ago
I was tempted to just refresh the update transient at that point too, but that'd have just introduced yet another case where updates disappear for a pageload after we do something for no good reason (when we already had code to work around it).
Could've also just issued an update check at that point (which would notice the plugins installed had changed), but that'd be another potential HTTP timeout after deletion.
For reference, this was introduced in [11207].