[wp-trac] [WordPress Trac] #41759: WP_HTTP_Response: Use setter instead of directly accessing the $data property
WordPress Trac
noreply at wordpress.org
Wed Aug 30 14:54:52 UTC 2017
#41759: WP_HTTP_Response: Use setter instead of directly accessing the $data
property
-------------------------+-----------------------------
Reporter: tfrommen | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP API | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
The constructor of the `WP_HTTP_Response` class (and thus also
`WP_REST_Response`) has three arguments: `$data`, `$status` and
`$headers`.
While there is a dedicated setter for each of the three properties,
`$data` is set directly.
In order to enable people to rely on inheritane and automatically use
overwritten methods, let's use the setter, please.
Patch will follow soonish.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41759>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list