HTTP API: Use WP_HTTP_Response::set_data() in ::__construct() instead of directly accessing the $data property.
Props tfrommen. Fixes #41759. Built from https://develop.svn.wordpress.org/trunk@41707 git-svn-id: http://core.svn.wordpress.org/trunk@41541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -48,7 +48,7 @@ class WP_HTTP_Response {
|
||||
* @param array $headers Optional. HTTP header map. Default empty array.
|
||||
*/
|
||||
public function __construct( $data = null, $status = 200, $headers = array() ) {
|
||||
$this->data = $data;
|
||||
$this->set_data( $data );
|
||||
$this->set_status( $status );
|
||||
$this->set_headers( $headers );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user