From edf4f86cbc03cb1a6a760b90524d0c90d027554b Mon Sep 17 00:00:00 2001 From: Kevin Porras Date: Tue, 14 Jan 2025 12:48:40 -0600 Subject: [PATCH] Only add to backups array if element matches. --- src/Commands/Backup/RestoreCommand.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Commands/Backup/RestoreCommand.php b/src/Commands/Backup/RestoreCommand.php index 3a2f11667..49bc24db6 100644 --- a/src/Commands/Backup/RestoreCommand.php +++ b/src/Commands/Backup/RestoreCommand.php @@ -88,7 +88,10 @@ protected function doGetBackups(string $site_env, array $elements, array $option foreach ($elements as $element) { $options['element'] = $element; try { - $backups[$element] = $this->getBackup($site_env, $options); + $backup = $this->getBackup($site_env, $options); + if ($backup->get('type') === $element) { + $backups[$element] = $backup; + } } catch (TerminusNotFoundException $e) { continue; }