diff --git a/.woodpecker/code-style.yml b/.woodpecker/code-style.yml index bfd94b0..91b7fba 100644 --- a/.woodpecker/code-style.yml +++ b/.woodpecker/code-style.yml @@ -1,4 +1,4 @@ -pipeline: +steps: code-style: image: composer commands: diff --git a/.woodpecker/functional-tests.yml b/.woodpecker/functional-tests.yml index d5e2d19..21d232b 100644 --- a/.woodpecker/functional-tests.yml +++ b/.woodpecker/functional-tests.yml @@ -13,7 +13,7 @@ matrix: - FLOW_VERSION: 8.3 PHP_VERSION: 8.1 -pipeline: +steps: functional-tests: image: "thecodingmachine/php:${PHP_VERSION}-v4-cli" environment: diff --git a/Classes/Http/TranslationRequestMiddleware.php b/Classes/Http/TranslationRequestMiddleware.php index 207d073..b7688f3 100644 --- a/Classes/Http/TranslationRequestMiddleware.php +++ b/Classes/Http/TranslationRequestMiddleware.php @@ -157,7 +157,15 @@ class TranslationRequestMiddleware implements MiddlewareInterface \ARRAY_FILTER_USE_KEY ); $result[$package] += \array_map( - static fn($value) => $value[0]['target'], + static function ($value) { + if (\count($value) === 1) { + return $value[0]['target']; + } + return \array_map( + static fn ($value) => $value['target'], + $value + ); + }, $matchingUnits ); }