diff --git a/library/Icinga/Web/Form.php b/library/Icinga/Web/Form.php index 054f7a89c..2beb09a5a 100644 --- a/library/Icinga/Web/Form.php +++ b/library/Icinga/Web/Form.php @@ -1169,9 +1169,7 @@ class Form extends Zend_Form $this->getView()->layout()->redirectUrl = $this->getRedirectUrl()->getAbsoluteUrl(); } } elseif ($this->getIsApiTarget()) { - $this->getResponse()->json()->setFailData( - array_merge($this->getMessages(), $this->getErrorMessages()) - )->sendResponse(); + $this->getResponse()->json()->setFailData($this->getMessages())->sendResponse(); } } elseif ($this->getValidatePartial()) { // The form can't be processed but we may want to show validation errors though