Skip to content

Commit

Permalink
Fixed #11312
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed May 30, 2022
1 parent 232546e commit 63ee35c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- Fixed a bug where addresses’ County fields were mislablled. ([#11314](https://github.com/craftcms/cms/pull/11314))
- Fixed a bug where the control panel’s login form wasn’t handling errors properly. ([#11319](https://github.com/craftcms/cms/pull/11319))
- Fixed a bug where it wasn’t possible to use a `{% redirect %}` tag in an error template. ([#11336](https://github.com/craftcms/cms/issues/11336))
- Fixed an error that occurred when saving an entry via a GraphQL mutation. ([#11312](https://github.com/craftcms/cms/issues/11312))

## 4.0.3 - 2022-05-20

Expand Down
6 changes: 2 additions & 4 deletions src/gql/base/ElementMutationResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,8 @@ protected function populateElementWithData(ElementInterface $element, array $arg
$value = $this->normalizeValue($argument, $value);
}
$element->setFieldValue($argument, $value);
} else {
if (property_exists($element, $argument)) {
$element->{$argument} = $value;
}
} elseif ($element->canSetProperty($argument)) {
$element->{$argument} = $value;
}
}

Expand Down

0 comments on commit 63ee35c

Please sign in to comment.