Skip to content

Commit

Permalink
magento/graphql-ce#761: [Customizable Options] Call to a member funct…
Browse files Browse the repository at this point in the history
…ion format() on boolean
  • Loading branch information
lenaorobei committed Oct 14, 2019
1 parent d2039f2 commit facce4c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ public function testAddDownloadableProductWithOptions()

$customOptionsValues = $this->getCustomOptionsValuesForQueryBySku->execute($sku);
/* Generate customizable options fragment for GraphQl request */
$queryCustomizableOptionValues = preg_replace('/"([^"]+)"\s*:\s*/', '$1:', json_encode($customOptionsValues));
$queryCustomizableOptionValues = preg_replace(
'/"([^"]+)"\s*:\s*/',
'$1:',
json_encode(array_values($customOptionsValues))
);
$customizableOptions = "customizable_options: {$queryCustomizableOptionValues}";

$query = $this->getQuery($maskedQuoteId, $qty, $sku, $customizableOptions, $linkId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ public function testAddVirtualProductWithOptions()

$customOptionsValues = $this->getCustomOptionsValuesForQueryBySku->execute($sku);
/* Generate customizable options fragment for GraphQl request */
$queryCustomizableOptionValues = preg_replace('/"([^"]+)"\s*:\s*/', '$1:', json_encode($customOptionsValues));
$queryCustomizableOptionValues = preg_replace(
'/"([^"]+)"\s*:\s*/',
'$1:',
json_encode(array_values($customOptionsValues))
);

$customizableOptions = "customizable_options: {$queryCustomizableOptionValues}";
$query = $this->getQuery($maskedQuoteId, $sku, $quantity, $customizableOptions);
Expand Down

0 comments on commit facce4c

Please sign in to comment.