1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-25 18:13:28 +01:00

[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'])
{
$client = new \Guzzle\Http\Client(
$this->u_action,
array(
$client = new \GuzzleHttp\Client([
'timeout' => 6,
'connect_timeout' => 6,
)
);
$collect_request = $client->post($collect_url, [], [
'systemdata' => $collector->get_data_for_form(),
]);
$response = $collect_request->send();
if ($response->isSuccessful())
$response = $client->post($collect_url, [
'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));
}