From cba4f4f568028d2eb019ddde0eded62799e1b377 Mon Sep 17 00:00:00 2001 From: Marc Alexander <admin@m-a-styles.de> Date: Fri, 12 Feb 2016 12:28:21 +0100 Subject: [PATCH] [ticket/14492] Use new guzzlehttp client PHPBB3-14492 --- phpBB/includes/acp/acp_help_phpbb.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/phpBB/includes/acp/acp_help_phpbb.php b/phpBB/includes/acp/acp_help_phpbb.php index bcbe61adb8..fa4de60456 100644 --- a/phpBB/includes/acp/acp_help_phpbb.php +++ b/phpBB/includes/acp/acp_help_phpbb.php @@ -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)); }