Skip to content

Commit

Permalink
Fixed handling of form errors in JsonErrorResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-sommer committed Jul 25, 2014
1 parent e8bee1b commit 389ec85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Http/JsonErrorResponse.php
Expand Up @@ -70,7 +70,7 @@ private function getMainErrorMessage(Form $form)
if (!empty($errors)) {
$message .= implode('. ', array_map(function(FormError $error) {
return rtrim($error->getMessage(), '.');
}, $errors));
}, $errors instanceof \Iterator ? iterator_to_array($errors) : $errors));

} else {
$message .= 'The form contains invalid values.';
Expand Down

0 comments on commit 389ec85

Please sign in to comment.