@@ -89,7 +89,7 @@ function (Repository $repository) use ($query): int {
8989 $ fields = $ this ->parseCommaDelimited ($ input ->getOption ('fields ' ));
9090
9191 do {
92- /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchHit[] $searchHits */
92+ /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchHit<\Ibexa\Contracts\Core\Repository\Values\Content\Content> [] $searchHits */
9393 $ searchHits = $ this ->repository ->sudo (
9494 function (Repository $ repository ) use ($ query ): iterable {
9595 $ languages = $ this ->configResolver ->getParameter ('languages ' );
@@ -98,7 +98,6 @@ function (Repository $repository) use ($query): iterable {
9898 },
9999 );
100100
101- /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content[] $contentItems */
102101 $ contentItems = array_map (
103102 static fn (SearchHit $ searchHit ): ValueObject => $ searchHit ->valueObject ,
104103 $ searchHits ,
@@ -132,7 +131,7 @@ private function clearVariationCache(Content $content): void
132131 private function generateVariations (Content $ content , array $ variations , array $ fields ): void
133132 {
134133 foreach ($ content ->getFields () as $ field ) {
135- if ($ field ->fieldTypeIdentifier !== 'ezimage ' ) {
134+ if ($ field ->fieldTypeIdentifier !== 'ibexa_image ' ) {
136135 continue ;
137136 }
138137
@@ -201,6 +200,15 @@ private function parseCommaDelimited(?string $value): array
201200 return [];
202201 }
203202
204- return array_values (array_unique (array_filter (array_map ('trim ' , explode (', ' , $ value )))));
203+ $ values = array_map ('mb_trim ' , explode (', ' , $ value ));
204+
205+ return array_values (
206+ array_unique (
207+ array_filter (
208+ $ values ,
209+ static fn (string $ value ): bool => $ value !== '' ,
210+ )
211+ )
212+ );
205213 }
206214}
0 commit comments