diff options
author | Julien Veyssier <julien-nc@posteo.net> | 2024-07-01 11:32:34 +0200 |
---|---|---|
committer | Julien Veyssier <julien-nc@posteo.net> | 2024-07-01 11:32:34 +0200 |
commit | 42cf03d73d6115c59f6bdfb447956817729e8e87 (patch) | |
tree | 6a4f4543ed8eee3756a0c20a0f268c36dd671a17 /lib/private/TaskProcessing | |
parent | 7e1dd0b25eae700eb5d44caba53b5fe6c738f3c0 (diff) | |
download | nextcloud-server-42cf03d73d6115c59f6bdfb447956817729e8e87.tar.gz nextcloud-server-42cf03d73d6115c59f6bdfb447956817729e8e87.zip |
fix(taskprocessing): in removeSuperfluousArrayKeys, don't try to keep input/output keys that are not in the task values
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Diffstat (limited to 'lib/private/TaskProcessing')
-rw-r--r-- | lib/private/TaskProcessing/Manager.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php index 0f93a672ed3..aca820dbeb7 100644 --- a/lib/private/TaskProcessing/Manager.php +++ b/lib/private/TaskProcessing/Manager.php @@ -490,6 +490,7 @@ class Manager implements IManager { */ private function removeSuperfluousArrayKeys(array $array, ...$specs): array { $keys = array_unique(array_reduce($specs, fn ($carry, $spec) => array_merge($carry, array_keys($spec)), [])); + $keys = array_filter($keys, fn ($key) => array_key_exists($key, $array)); $values = array_map(fn (string $key) => $array[$key], $keys); return array_combine($keys, $values); } |