Opened 9 years ago
Closed 9 years ago
#41759 closed enhancement (fixed)
WP_HTTP_Response: Use setter instead of directly accessing the $data property
| Reported by: | tfrommen | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9 |
| Component: | HTTP API | Version: | 4.4 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: | rest-api |
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
@
9 years ago
- Focuses rest-api added
- Keywords commit added
- Milestone Awaiting Review → 4.9
- Version → 4.4
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 41707: