#42757 closed defect (bug) (invalid)
Php notice when clicking View details on a plugin from the Plugins list view (edge case)
Reported by: | mathieuhays | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Plugins | Keywords: | close |
Focuses: | Cc: |
Description
Hi,
I've just updated to 4.9.1. A warning now appears when clicking on "View details" on the plugin list page.
The issue comes from get_installed_plugins
.
This function gets data from the transient update_plugins
. In this data there's a list of stdClass objects. One of these objects doesn't have a slug.
get_installed_plugins
doesn't test for the use-case where a slug doesn't exist.
The plugin without a slug in my case is WooCommerce Helper (woothemes-updater version 1.7.2).
I didn't manage to replicate this on a new install. After some testing I notice that this issue will only happen on existing installs because the faulty object won't be included when generating the transient in 4.9.1. This transient doesn't expire.
The fix in this case is to delete the existing _site_transient_update_plugins
from the options table so it can be re-generated without the faulty object.
Should we add a test for the slug in get_installed_plugins
for that use-case?
Attachments (1)
Change History (3)
#1
@
6 years ago
- Keywords close added
- Resolution set to invalid
- Status changed from new to closed
This seems like an issue with the plugin in question and not with WordPress core. Especially as it appears the plugin is hooking into the update hooks with woothemes-updater. If this issue persists it would be more reasonable to raise the issue with the plugin developer.
Screenshot of the php notice