Opened 4 years ago
Closed 4 years ago
#52205 closed defect (bug) (fixed)
REST API: Plugins Controller single plugin route fatal errors on multisite
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.6.1 | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | REST API | Keywords: | good-first-bug has-patch fixed-major |
Focuses: | rest-api | Cc: |
Description
On multisite, trying to GET
the single plugin endpoint, for example wp/v2/plugins/hello
, fatal errors because is_network_only_plugin
is not defined. This also effects the delete endpoint.
Due to how the collection route and installation routes are structured, they don't run into this issue. To fix this, I think we should add require_once ABSPATH . 'wp-admin/includes/plugin.php';
to the top of check_read_permission
to make sure all our bases are covered.
Attachments (1)
Change History (6)
Note: See
TracTickets for help on using
tickets.
This wasn't introduced in 5.6 but it's a good candidate for a patch release. Moving to 5.6.1.
Thanks for the patch @oakesjosh .