mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-14 06:14:23 +00:00
fix issue628 when result is null
This commit is contained in:
parent
37662a4187
commit
e487bdf7fd
@ -496,9 +496,14 @@ class SpreadSheetFormatter implements FormatterInterface
|
|||||||
// 3. iterate on `keysExportElementAssociation` to store the callable
|
// 3. iterate on `keysExportElementAssociation` to store the callable
|
||||||
// in cache
|
// in cache
|
||||||
foreach ($keysExportElementAssociation as $key => [$element, $data]) {
|
foreach ($keysExportElementAssociation as $key => [$element, $data]) {
|
||||||
|
// handle the case when there is not results lines (query is empty)
|
||||||
|
if ([] === $allValues) {
|
||||||
|
$this->cacheDisplayableResult[$key] = $element->getLabels($key, ['_header'], $data);
|
||||||
|
} else {
|
||||||
$this->cacheDisplayableResult[$key] =
|
$this->cacheDisplayableResult[$key] =
|
||||||
$element->getLabels($key, array_unique($allValues[$key]), $data);
|
$element->getLabels($key, array_unique($allValues[$key]), $data);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// the cache is initialized !
|
// the cache is initialized !
|
||||||
$this->cacheDisplayableResultIsInitialized = true;
|
$this->cacheDisplayableResultIsInitialized = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user