From fac51f61e343941e173ed940274df24581e78d15 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 3 Oct 2017 15:17:09 +0000 Subject: [PATCH] HTTP API: Use `WP_HTTP_Response::set_data()` in `::__construct()` instead of directly accessing the `$data` property. Props tfrommen. Fixes #41759. git-svn-id: https://develop.svn.wordpress.org/trunk@41707 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-http-response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-http-response.php b/src/wp-includes/class-wp-http-response.php index 498af5fa7a..4bf95c3a19 100644 --- a/src/wp-includes/class-wp-http-response.php +++ b/src/wp-includes/class-wp-http-response.php @@ -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 ); }