From 94b1596d1f9a4e4a24027b1b37c534feced01b5b Mon Sep 17 00:00:00 2001 From: DanielSeifert Date: Thu, 23 Oct 2014 08:38:08 +0000 Subject: [PATCH] error in details, if no category is defined for current article (#3160) --- .../modules/models/d3_oxbasket_googleanalytics.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/copy_this/modules/d3/d3_googleanalytics/modules/models/d3_oxbasket_googleanalytics.php b/copy_this/modules/d3/d3_googleanalytics/modules/models/d3_oxbasket_googleanalytics.php index 8facd74..3870d9a 100644 --- a/copy_this/modules/d3/d3_googleanalytics/modules/models/d3_oxbasket_googleanalytics.php +++ b/copy_this/modules/d3/d3_googleanalytics/modules/models/d3_oxbasket_googleanalytics.php @@ -22,6 +22,7 @@ class d3_oxbasket_googleanalytics extends d3_oxbasket_googleanalytics_parent public function d3GetCurrentLocatorTitle() { $sTitle = ''; + /** @var oxview $oView */ $oView = oxRegistry::getConfig()->getActiveView(); if (method_exists($oView, 'getBreadCrumb') && @@ -32,8 +33,13 @@ class d3_oxbasket_googleanalytics extends d3_oxbasket_googleanalytics_parent } } elseif ($oView->getClassName() == 'details' && ( - ($oCatPath = $oView->getCategoryTree()->getPath()) || - ($oCatPath = $oView->getManufacturerTree()->getPath()) + ( + ($oCatTree = $oView->getCategoryTree()) && + ($oCatPath = $oCatTree->getPath()) + ) || ( + ($oCatTree = $oView->getManufacturerTree()) && + ($oCatPath = $oCatTree->getPath()) + ) ) ) { foreach ($oCatPath as $oCat) {