Skip to content

Commit 4be7172

Browse files
authored
fix: advancedManyToManyRelation input metadata fix (#953)
1 parent 693646b commit 4be7172

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyObjectRelation.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public function process($object, $newValue, $args, $context, ResolveInfo $info)
4242
$result = [];
4343
if (is_array($newValue)) {
4444
foreach ($newValue as $newValueItemKey => $newValueItemValue) {
45+
$columns = [];
4546
$element = $this->getElementByTypeAndIdOrPath($newValueItemValue);
4647

4748
if ($element) {
@@ -54,7 +55,7 @@ public function process($object, $newValue, $args, $context, ResolveInfo $info)
5455
}
5556
}
5657
$concrete = Concrete::getById($element->getId());
57-
$item = new ObjectMetadata($fieldName, $columns ?? [], $concrete);
58+
$item = new ObjectMetadata($fieldName, $columns, $concrete);
5859
if ($data !== []) {
5960
$item->setData($data);
6061
}

0 commit comments

Comments
 (0)