[ticket/14492] Use new guzzlehttp client

PHPBB3-14492
This commit is contained in:
Marc Alexander 2016-02-12 12:28:21 +01:00
parent 4451db9f22
commit cba4f4f568
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -87,20 +87,19 @@ class acp_help_phpbb
if ($config['help_send_statistics']) if ($config['help_send_statistics'])
{ {
$client = new \Guzzle\Http\Client( $client = new \GuzzleHttp\Client([
$this->u_action,
array(
'timeout' => 6, 'timeout' => 6,
'connect_timeout' => 6, 'connect_timeout' => 6,
)
);
$collect_request = $client->post($collect_url, [], [
'systemdata' => $collector->get_data_for_form(),
]); ]);
$response = $collect_request->send(); $response = $client->post($collect_url, [
if ($response->isSuccessful()) 'body' => [
'systemdata' => $collector->get_data_for_form(),
]
]);
$response_status = $response->getStatusCode();
if ($response_status >= 200 && $response_status < 300)
{ {
trigger_error($user->lang('THANKS_SEND_STATISTICS') . adm_back_link($this->u_action)); trigger_error($user->lang('THANKS_SEND_STATISTICS') . adm_back_link($this->u_action));
} }