Skip to content

Commit 42f6f5e

Browse files
Merge pull request #27 from punktDe/bugfix/access-on-empty-values
BUGFIX: Correctly handle permissions on empty sites and dimensions
2 parents ec1a9ad + 72cea1d commit 42f6f5e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Classes/Domain/Repository/FormDataRepository.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ function (FormData $formDataSample) {
191191
return $this->siteAccesibilityService->isSiteAccessible($formDataSample->getSiteName()) ? $formDataSample->getSiteName() : null;
192192
},
193193
$this->findAllUnique('form.siteName')
194-
));
194+
), function (?string $value) {
195+
return $value !== null;
196+
});
195197
}
196198

197199
protected function initializeAccessibleDimensions(): array
@@ -201,7 +203,9 @@ function (FormData $formDataSample) {
201203
return $this->dimensionAccesibilityService->isDimensionCombinationAccessible($formDataSample->getContentDimensions()) ? $formDataSample->getDimensionsHash() : null;
202204
},
203205
$this->findAllUnique('form.dimensionsHash')
204-
));
206+
), function (?string $value) {
207+
return $value !== null;
208+
});
205209
}
206210

207211
protected function findAllUnique(string $groupField): array

0 commit comments

Comments
 (0)