[wp-trac] [WordPress Trac] #42757: Php notice when clicking View details on a plugin from the Plugins list view (edge case)

WordPress Trac noreply at wordpress.org
Thu Nov 30 11:51:05 UTC 2017


#42757: Php notice when clicking View details on a plugin from the Plugins list
view (edge case)
--------------------------+-----------------------------
 Reporter:  mathieuhays   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Plugins       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42757>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list