Skip to content

Commit 073acc2

Browse files
committed
Don't use WP_HTTP_Requests_Response (WP 3.7 compat)
1 parent edf789f commit 073acc2

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/Context/GivenStepDefinitions.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,16 @@ static function( \$pre, \$parsed_args, \$url ) {
180180
)
181181
);
182182
183-
\$response = new WP_HTTP_Requests_Response( \$response );
184-
185-
return \$response->to_array();
183+
return array(
184+
'headers' => \$response->headers->getAll(),
185+
'body' => \$response->body,
186+
'response' => array(
187+
'code' => \$response->status_code,
188+
'message' => get_status_header_desc( \$response->status_code ),
189+
),
190+
'cookies' => array(),
191+
'filename' => '',
192+
);
186193
}
187194
}
188195

0 commit comments

Comments
 (0)