diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php index b648fcf83..ec4ce6315 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php @@ -65,11 +65,13 @@ class LocationTypeAggregator implements AggregatorInterface return 'Accepted locationtype'; } - if (null === $value) { + if (null === $value || '' === $value) { return ''; } - $lt = $this->locationTypeRepository->find($value); + if (null === $lt = $this->locationTypeRepository->find($value)) { + return ''; + } return $this->translatableStringHelper->localize( $lt->getTitle() diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php index b23b304f6..6574e3934 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php @@ -66,7 +66,13 @@ final class LocationTypeAggregator implements AggregatorInterface return 'Location type'; } - $j = $this->locationTypeRepository->find($value); + if (null === $value || '' === $value) { + return ''; + } + + if (null === $j = $this->locationTypeRepository->find($value)) { + return ''; + } return $this->translatableStringHelper->localize( $j->getTitle()