Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Phalcon\Forms\Form::getMessages() produces PHP error if form is valid. #1349

Closed
temuri416 opened this issue Oct 8, 2013 · 0 comments
Closed

Comments

@temuri416
Copy link
Contributor

Call to Phalcon\Forms\Form::getMessages() fails if there are no form validation errors.

Phalcon\Forms\Form::getMessages() in the code below would raise PHP E_ERROR "The argument is not iterable()":

$form = new Phalcon\Forms\Form;
$form->add(new Phalcon\Forms\Element\Text('name'));
$form->isValid([
    'name' => 'John',
]);
$form->getMessages();

If form fails validation $form->getMessages() works as expected.

Implement bug fix.

I am on Phalcon 1.3.0.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant