From d45af315037c95b190f88c27d5587bc4bc7d22d6 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 30 Sep 2019 10:41:31 +0200 Subject: [PATCH] DeploymentLinkForm: ignore unreachable core fixes #1966 --- application/forms/DeploymentLinkForm.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/application/forms/DeploymentLinkForm.php b/application/forms/DeploymentLinkForm.php index 2a0f3768..044dd086 100644 --- a/application/forms/DeploymentLinkForm.php +++ b/application/forms/DeploymentLinkForm.php @@ -84,7 +84,13 @@ class DeploymentLinkForm extends DirectorForm $this->setAttrib('class', 'inline'); $this->addHtml(Icon::create('wrench')); - $target = $this->shouldWarnAboutBug7530() ? '_self' : '_next'; + try { + // As this is shown for single objects, ignore errors caused by an + // unreachable core + $target = $this->shouldWarnAboutBug7530() ? '_self' : '_next'; + } catch (\Exception $e) { + $target = '_next'; + } $this->addSubmitButton($this->translate('Deploy'), [ 'class' => 'link-button icon-wrench', 'title' => $msg, @@ -108,8 +114,12 @@ class DeploymentLinkForm extends DirectorForm public function onSuccess() { - if ($this->skipBecauseOfBug7530()) { - return; + try { + if ($this->skipBecauseOfBug7530()) { + return; + } + } catch (\Exception $e) { + // continue } $this->deploy(); }