[wp-trac] [WordPress Trac] #52205: REST API: Plugins Controller single plugin route fatal errors on multisite
WordPress Trac
noreply at wordpress.org
Sun Jan 3 05:50:56 UTC 2021
#52205: REST API: Plugins Controller single plugin route fatal errors on multisite
-------------------------------+----------------------------
Reporter: TimothyBlynJacobs | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.7
Component: REST API | Version: 5.5
Severity: normal | Keywords: good-first-bug
Focuses: rest-api |
-------------------------------+----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52205>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list