Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #32 from punktDe/removeWarningOnEmpyArraysInExcelView
Browse files Browse the repository at this point in the history
FIX: remove a warning if ExcelListView is called and cells contain an empty array
  • Loading branch information
kabarakh authored Feb 23, 2018
2 parents be87724 + 320ae56 commit 50d7d7a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Classes/View/Export/ExcelListView.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,16 @@ protected function renderBody()
/* @var $listCell Tx_PtExtlist_Domain_Model_List_Cell */

$cellValue = $listCell->getValue();

if (is_array($cellValue)) {
if (empty($cellValue)) {
$cellValue = '';
} else {
throw new \TYPO3\CMS\Core\Error\Http\StatusException([\TYPO3\CMS\Core\Utility\HttpUtility::HTTP_STATUS_500],
'Array given to render in excel, string expected', '', 1518776229);
}
}

if ($this->stripTags) {
$cellValue = strip_tags($cellValue);
}
Expand Down

0 comments on commit 50d7d7a

Please sign in to comment.