From afb6f6f85a6f12ebfaf17869c7e86316b3a2e585 Mon Sep 17 00:00:00 2001 From: lukmzig <30526586+lukmzig@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:13:06 +0200 Subject: [PATCH] fix: STAN (#882) --- .../AdvancedManyToManyObjectRelation.php | 2 +- .../DataObjectInputProcessor/AdvancedManyToManyRelation.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyObjectRelation.php b/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyObjectRelation.php index 4006c437..45040497 100644 --- a/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyObjectRelation.php +++ b/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyObjectRelation.php @@ -55,7 +55,7 @@ public function process($object, $newValue, $args, $context, ResolveInfo $info) } $concrete = Concrete::getById($element->getId()); $item = new ObjectMetadata($fieldName, $columns ?? [], $concrete); - if (isset($data) === true) { + if ($data !== []) { $item->setData($data); } $result[] = $item; diff --git a/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyRelation.php b/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyRelation.php index 07a4fe99..492eac83 100644 --- a/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyRelation.php +++ b/src/GraphQL/DataObjectInputProcessor/AdvancedManyToManyRelation.php @@ -54,7 +54,7 @@ public function process($object, $newValue, $args, $context, ResolveInfo $info) } } $item = new ElementMetadata($fieldName, $columns ?? [], $element); - if (isset($data) === true) { + if ($data !== []) { $item->setData($data); } $result[] = $item;