From 5a77a9e66830d2155cdcde0df8a477cba5c70962 Mon Sep 17 00:00:00 2001 From: massimoconti <37350933+massimoconti@users.noreply.github.com> Date: Wed, 30 Jun 2021 11:55:27 +0200 Subject: [PATCH] Avoid version duplication in custom user agent --- src/Omnisend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Omnisend.php b/src/Omnisend.php index 4145cea..0b803be 100644 --- a/src/Omnisend.php +++ b/src/Omnisend.php @@ -218,7 +218,7 @@ private function omnisendApi($endpoint, $method = "POST", $fields = array(), $qu if ($this->useCurl) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $link); - curl_setopt($ch, CURLOPT_USERAGENT, 'Omnisend/PHP-SDK/1.2'); + curl_setopt($ch, CURLOPT_USERAGENT, 'Omnisend/PHP-SDK/' . $this->version); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_VERBOSE, false);