From bce1bd8192e07a53aa1798135fff2d0c1b27940c Mon Sep 17 00:00:00 2001 From: acognet Date: Tue, 22 Jun 2021 12:24:14 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B03912=20-=20Polishing:=20Export?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/tabularbulkexport.class.inc.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) 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;