From 5ad648a394e36a789936ee34d915b06c1d2ee64c Mon Sep 17 00:00:00 2001 From: RayEhrhardt Date: Thu, 30 Oct 2014 09:06:01 +0000 Subject: [PATCH] Fixed php5.3 compatibility. #3181 --- .../modules/components/d3_oxcmp_utils_googleanalytics.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php b/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php index ebba2e0..933b22e 100644 --- a/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php +++ b/copy_this/modules/d3/d3_googleanalytics/modules/components/d3_oxcmp_utils_googleanalytics.php @@ -293,7 +293,8 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare public function d3GetGTSLang() { $aHomeCountries = oxRegistry::getConfig()->getConfigParam('aHomeCountry'); - $sHomeCountryId = $aHomeCountries[array_keys($aHomeCountries)[0]]; + $aKeys = array_keys($aHomeCountries); + $sHomeCountryId = $aHomeCountries[current($aKeys)]; /** @var oxcountry $oCountry */ $oCountry = oxNew('oxcountry'); $oCountry->load($sHomeCountryId); @@ -326,7 +327,6 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare return array('aArtIdList' => $aArticleIds); } - /** * @param array $aArticleIds * @@ -335,7 +335,9 @@ class d3_oxcmp_utils_googleanalytics extends d3_oxcmp_utils_googleanalytics_pare public function d3GATSGetProdIdList($aArticleIds) { if (count($aArticleIds)) { - return $aArticleIds[array_keys($aArticleIds)[0]]; + $aKeys = array_keys($aArticleIds); + + return $aArticleIds[current($aKeys)]; } else { return "not_set"; }