From 3a208453565d86e428c6f554acbd2d7667304659 Mon Sep 17 00:00:00 2001 From: IrinaZhadzinets Date: Mon, 20 Jun 2022 12:44:08 +0300 Subject: [PATCH] scandipwa/scandipwa#2685 - Add validation for empty order id --- src/Model/Resolver/CreateCustomer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Resolver/CreateCustomer.php b/src/Model/Resolver/CreateCustomer.php index c2300eb..513d941 100644 --- a/src/Model/Resolver/CreateCustomer.php +++ b/src/Model/Resolver/CreateCustomer.php @@ -87,7 +87,7 @@ public function resolve( ) { $output = parent::resolve($field, $context, $info, $value, $args); - if (isset($args['input']['orderID']) && isset($output['customer']['id'])) { + if (isset($args['input']['orderID']) && !empty($args['input']['orderID']) && isset($output['customer']['id'])) { $orderModel = $this->orderFactory->create()->loadByIncrementId($args['input']['orderID']); $orderModel->setCustomerId($output['customer']['id']);