[wp-trac] [WordPress Trac] #60540: Plugin dependencies: guard against unexpected responses to the `plugin_information` API endpoint
WordPress Trac
noreply at wordpress.org
Wed Feb 28 18:02:24 UTC 2024
#60540: Plugin dependencies: guard against unexpected responses to the
`plugin_information` API endpoint
---------------------------------------------+----------------------
Reporter: pbiron | Owner: costdev
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.5
Component: Plugins | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
---------------------------------------------+----------------------
Changes (by costdev):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"57736" 57736]:
{{{
#!CommitTicketReference repository="" revision="57736"
Plugin Dependencies: Don't assume API response has a `slug` property.
Previously, `WP_Plugin_Dependencies::get_dependency_api_data()` attempted
to set an array key using the `slug` property returned in a Plugins API
response. However, the Plugins API response is filterable and may not
contain a `slug` property.
Earlier in the method, a local `$slug` variable is used as a key for the
same array.
For safety and consistency, this replaces array key references to
`$information->slug` with `$slug`.
Follow-up to [57545].
Props pbiron, afragen, swissspidy, costdev.
Fixes #60540.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60540#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list