Skip to content

Commit

Permalink
fix(taskprocessing): input validation was dropping some optional inputs
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
  • Loading branch information
julien-nc committed Jun 24, 2024
1 parent 879eaa7 commit 0593fbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/TaskProcessing/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ private function validateOutput(array $spec, array $io, bool $optional = false):
* @psalm-template T
*/
private function removeSuperfluousArrayKeys(array $array, ...$specs): array {
$keys = array_unique(array_reduce($specs, fn ($carry, $spec) => $carry + array_keys($spec), []));
$keys = array_unique(array_reduce($specs, fn ($carry, $spec) => array_merge($carry, array_keys($spec)), []));
$values = array_map(fn (string $key) => $array[$key], $keys);
return array_combine($keys, $values);
}
Expand Down

0 comments on commit 0593fbf

Please sign in to comment.