Form: Don't transmit duplicate error messages

Zend_Form::getMessages() already returns custom error messages,
if there are any
This commit is contained in:
Johannes Meyer 2017-07-13 12:59:23 +02:00
parent b93dc06f5b
commit 96c96df636
1 changed files with 1 additions and 3 deletions

View File

@ -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