Issues

ZF-12351: Incompatibility

Issue Type: Bug Created: 2012-07-27T19:28:59.000+0000 Last Updated: 2012-07-30T07:36:32.000+0000 Status: Open Fix version(s): Reporter: Murilo Carvalho (muril000) Assignee: Christian Albrecht (alab) Tags: - Zend_Form

Related issues: Attachments:

Description

The method Zend_Form->setErrors(array) and Zend_Form->getErrors() are not compatibles, for example, if I use the setErrors() method and as a parameter I send the return value of the method getErrors of the same form, the errors will not be setted properly

Comments

Posted by Frank Br├╝ckner (frosch) on 2012-07-30T07:36:32.000+0000

This is true, because Zend_Form::getErrors() provides error codes for all elements failing validation.

Zend_Form::setErrors() uses Zend_Form::addErrors() uses Zend_Form::addError() uses Zend_Form::addErrorMessage() and addErrorMessage() adds a custom error message to return in the event of failed validation.

I think, if we change this then we have a BC break.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts