From 8c4974fa3bc42d64c16b88b26f326106088e9ac1 Mon Sep 17 00:00:00 2001 From: Johannes Hammersen Date: Tue, 2 Jul 2024 14:48:34 +0200 Subject: [PATCH 1/3] Fix Amazon deprecation warnings --- Oara/Network/Publisher/Amazon.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Oara/Network/Publisher/Amazon.php b/Oara/Network/Publisher/Amazon.php index 737c5090..eb00f287 100755 --- a/Oara/Network/Publisher/Amazon.php +++ b/Oara/Network/Publisher/Amazon.php @@ -31,6 +31,7 @@ class Amazon extends \Oara\Network { + protected array $_credentials; public function login($credentials) { $this->_credentials = $credentials; From 2a46b4852f47a967f49de237358fe11b0754febe Mon Sep 17 00:00:00 2001 From: Johannes Hammersen Date: Tue, 2 Jul 2024 14:49:59 +0200 Subject: [PATCH 2/3] Fix TradeDoubler deprecation warnings --- Oara/Network/Publisher/TradeDoubler.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Oara/Network/Publisher/TradeDoubler.php b/Oara/Network/Publisher/TradeDoubler.php index a5170c51..e01dc994 100755 --- a/Oara/Network/Publisher/TradeDoubler.php +++ b/Oara/Network/Publisher/TradeDoubler.php @@ -37,6 +37,9 @@ class TradeDoubler extends \Oara\Network protected $_client = null; protected $_dateFormat = null; protected $_apiUrl = 'https://connect.tradedoubler.com'; + protected array $_credentials; + protected string $_grant_type; + protected string $_token; public function login($credentials) { From fc187b034698ae434ac808b09538bdd1e247c6c3 Mon Sep 17 00:00:00 2001 From: Johannes Hammersen Date: Tue, 2 Jul 2024 15:10:00 +0200 Subject: [PATCH 3/3] Fix AffiliateWindow deprecations utf8_encode is deprecated in PHP 8.2, switched to mb_convert_encoding --- Oara/Network/Publisher/AffiliateWindow.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Oara/Network/Publisher/AffiliateWindow.php b/Oara/Network/Publisher/AffiliateWindow.php index 478aff0a..d6c157fa 100755 --- a/Oara/Network/Publisher/AffiliateWindow.php +++ b/Oara/Network/Publisher/AffiliateWindow.php @@ -124,7 +124,7 @@ public function getMerchantList() if ($result === false || !is_array($result)) { throw new \Exception("php-oara AffiliateWindow - file_get_contents error"); } else { - $content = \utf8_encode($result[0]); + $content = mb_convert_encoding($result[0], 'UTF-8', 'ISO-8859-1'); $merchantList = \json_decode($content); } foreach ($merchantList as $merchant) { @@ -215,7 +215,7 @@ public function getTransactionList($merchantList = null, \DateTime $dStartDate = throw new \Exception("php-oara AffiliateWindow - file_get_contents is false"); } else { //echo "oara step3
"; - $content = \utf8_encode($result); + $content = mb_convert_encoding($result, 'UTF-8', 'ISO-8859-1'); $transactionObjectFull = \json_decode($content); // 2018-10-18 foreach($transactionObjectFull as $transactionObject){ @@ -382,7 +382,7 @@ public function getAdvertisers($apiKey) { throw new \Exception("php-oara AffiliateWindow getAdvertisers - http error"); } else { - $content = \utf8_encode($result[0]); + $content = mb_convert_encoding($result[0], 'UTF-8', 'ISO-8859-1');; $advList = \str_getcsv($content, "\n"); } } catch (\Exception $e) {