From e3b9e3dbc0925506dcade23881b824a859efa886 Mon Sep 17 00:00:00 2001 From: BadPixxel Date: Wed, 22 Nov 2017 00:59:18 +0100 Subject: [PATCH] Allow Restore of Multiple Databases Types Currently if you set more than one Database format, only the first one is restored. Moreover, no user message is present. --- Manager/DatabaseManager.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Manager/DatabaseManager.php b/Manager/DatabaseManager.php index de7afbb..8db6d5d 100644 --- a/Manager/DatabaseManager.php +++ b/Manager/DatabaseManager.php @@ -60,13 +60,16 @@ public function dump() */ public function restore() { + $Restored = 0; foreach ($this->children as $child) { if ($child instanceof RestorableDatabaseInterface) { $child->restore(); - return; + $Restored++; } } - - throw MissingRestorableDatabaseException::create(); + + if ( !$Restored ) { + throw MissingRestorableDatabaseException::create(); + } } }