diff --git a/core/tabularbulkexport.class.inc.php b/core/tabularbulkexport.class.inc.php index 45f687c973..be1c529277 100644 --- a/core/tabularbulkexport.class.inc.php +++ b/core/tabularbulkexport.class.inc.php @@ -286,19 +286,16 @@ abstract class TabularBulkExport extends BulkExport $aSampleRow = array(); foreach($aAuthorizedClasses as $sAlias => $sClass) { - if (count($aAuthorizedClasses) > 1 ) - { + if (count($aAuthorizedClasses) > 1) { $sShortAlias = $sAlias.'.'; - } - else - { + } else { $sShortAlias = ''; } - - foreach ($aAllAttCodes[$sAlias] as $sAttCodeEx) - { - $oObj = $aRow[$sAlias]; - $aSampleRow[$sShortAlias.$sAttCodeEx] = $oObj ? $this->GetSampleData($oObj, $sAttCodeEx) : ''; + if (isset($aAllAttCodes[$sAlias])) { + foreach ($aAllAttCodes[$sAlias] as $sAttCodeEx) { + $oObj = $aRow[$sAlias]; + $aSampleRow[$sShortAlias.$sAttCodeEx] = $oObj ? $this->GetSampleData($oObj, $sAttCodeEx) : ''; + } } } $aSampleData[] = $aSampleRow;