]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Fix restoring backup from deleted clients
authorMarcin Haba <marcin.haba@bacula.pl>
Sun, 5 Aug 2018 12:11:59 +0000 (14:11 +0200)
committerMarcin Haba <marcin.haba@bacula.pl>
Sun, 5 Aug 2018 12:11:59 +0000 (14:11 +0200)
gui/baculum/protected/Web/Pages/RestoreWizard.php

index b92b480833e63962e4752095423c18306f16f282..e01ed8c860647d870d6cb12d47836c2894bdd86f 100644 (file)
@@ -117,12 +117,15 @@ class RestoreWizard extends BaculumWebPage
                if (is_object($job)) {
                        $this->loadRestoreClients();
                        $client = $this->getBackupClient($job->clientid);
-                       $this->BackupClientName->SelectedValue = $client;
-                       $this->RestoreClient->SelectedValue = $client;
-                       $this->loadBackupsForClient();
-                       $step_index = new stdClass;
-                       $step_index->CurrentStepIndex = 3;
-                       $this->wizardNext(null, $step_index);
+                       // client is null for restore backup from deleted clients in catalog
+                       if (!is_null($client)) {
+                               $this->BackupClientName->SelectedValue = $client;
+                               $this->RestoreClient->SelectedValue = $client;
+                               $this->loadBackupsForClient();
+                               $step_index = new stdClass;
+                               $step_index->CurrentStepIndex = 3;
+                               $this->wizardNext(null, $step_index);
+                       }
                }
        }