Opened 8 years ago
Closed 7 years ago
#41759 closed enhancement (fixed)
WP_HTTP_Response: Use setter instead of directly accessing the $data property
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | HTTP API | Keywords: | has-patch commit |
Focuses: | rest-api | Cc: |
Description
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.
Attachments (1)
Change History (7)
#2
@
8 years ago
- Focuses rest-api added
- Keywords commit added
- Milestone changed from Awaiting Review to 4.9
- Version set to 4.4
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
This ticket was mentioned in Slack in #core-restapi by tfrommen. View the logs.
7 years ago
Note: See
TracTickets for help on using
tickets.
In 41707: