Skip to content

Commit

Permalink
1.0.7 - Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
andries committed Mar 17, 2021
1 parent c5e004d commit 1ee64f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to `form-to-json-bundle` will be documented in this file

## 1.0.7 - 2020-03-16
- Fixed type bug in value normalizer

## 1.0.6 - 2020-03-16
- Changed schema
- Added better value & error normalizers
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"bundle",
"form"
],
"version": "1.0.6",
"version": "1.0.7",
"type": "symfony-bundle",
"require": {
"php": ">=8.0",
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/FormValuesNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ private function getValues(FormInterface $form, FormView $formView)

$data = (object) [];
foreach ($formView->children as $name => $child) {
if ($form->has($name)) {
$data->{$name} = $this->getValues($form->get($name), $child);
if ($form->has((string) $name)) {
$data->{$name} = $this->getValues($form->get((string) $name), $child);
}
}

Expand Down

0 comments on commit 1ee64f3

Please sign in to comment.