From 39439682e2682613ba8cfd56006a3d9c3ba4bd91 Mon Sep 17 00:00:00 2001 From: Jon Uhlmann Date: Tue, 6 Aug 2024 19:03:40 +0200 Subject: [PATCH] Fix: Handle true value in objects Closes #11 --- Classes/Service/MergeClassesService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Service/MergeClassesService.php b/Classes/Service/MergeClassesService.php index 6b0e206..a1a5982 100644 --- a/Classes/Service/MergeClassesService.php +++ b/Classes/Service/MergeClassesService.php @@ -71,9 +71,9 @@ private static function flattenMergeArgument($value): array $value = iterator_to_array($value); } if (is_array($value)) { - array_walk_recursive($value, function ($a) use (&$return) { + array_walk_recursive($value, function ($a, $key) use (&$return) { if ($a === true) { - $a = ['true']; + $a = [$key]; } if (is_scalar($a)) { $a = explode(' ', (string)$a);