avoid messages, if oUser is not an oxuser instance

This commit is contained in:
Daniel Seifert 2013-04-24 10:42:11 +00:00
parent e3b5ead1de
commit 3ef5c07478
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ class d3_order_googleanalytics extends d3_order_googleanalytics_parent {
protected function _d3SetIsNewCustomer()
{
$oUser = $this->getUser();
$isNewCustomer = isset($oUser) ? $oUser->inGroup('oxidnotyetordered') : 0 ;
$isNewCustomer = (isset($oUser) && $oUser instanceof oxuser) ? $oUser->inGroup('oxidnotyetordered') : 0 ;
oxRegistry::getSession()->setVariable('iD3GANewCustomer', (int)$isNewCustomer);
}