From 14a77ea88da18a2021f045df2fd3c51c6af1b123 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 19 May 2023 15:45:23 +0200 Subject: [PATCH] fix getAllBackupVolumes Signed-off-by: Simon L --- php/src/Docker/DockerActionManager.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index ef41a1f5..c11f16a0 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -522,8 +522,15 @@ class DockerActionManager private function getAllBackupVolumes() : array { $id = 'nextcloud-aio-apache'; - - return array_unique($this->getBackupVolumes($id)); + $backupVolumesArray = $this->getBackupVolumes($id); + // Flatten array + $backupVolumesArrayFlat = iterator_to_array( + new \RecursiveIteratorIterator( + new \RecursiveArrayIterator($backupVolumesArray) + ), + $use_keys = false + ); + return array_unique($backupVolumesArrayFlat); } private function GetRepoDigestsOfContainer(string $containerName) : ?array {