From ccdadf68f27bec47f1cc0598c105215c7a560e8d Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 25 Jan 2019 07:44:35 +0100 Subject: [PATCH] MoveNodeForm: Respond with a status of 400 in case of a ModificationError --- application/forms/MoveNodeForm.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/forms/MoveNodeForm.php b/application/forms/MoveNodeForm.php index 06ada01..d261eac 100644 --- a/application/forms/MoveNodeForm.php +++ b/application/forms/MoveNodeForm.php @@ -154,7 +154,9 @@ class MoveNodeForm extends QuickForm $this->parentNode !== null ? $this->parentNode->getName() : null ); } catch (ModificationError $e) { - $this->notifyError($e->getMessage()) + $this->notifyError($e->getMessage()); + Icinga::app()->getResponse() + ->setHttpResponseCode(400) ->redirectAndExit($this->getSuccessUrl()); }