Skip to content

Commit

Permalink
Merge pull request #36 from IrinaZhadzinets/issue-2685
Browse files Browse the repository at this point in the history
scandipwa/scandipwa#2685 - Add validation for empty order id
  • Loading branch information
carinadues authored Jul 6, 2022
2 parents 55f719f + 3a20845 commit 4b4f910
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model/Resolver/CreateCustomer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down

0 comments on commit 4b4f910

Please sign in to comment.