Skip to content

Commit

Permalink
check for value before _syncProductQuestionValue call
Browse files Browse the repository at this point in the history
  • Loading branch information
jlivas committed Feb 2, 2022
1 parent 2149d39 commit 41f3909
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
22 changes: 12 additions & 10 deletions Model/Sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -1589,17 +1589,19 @@ private function _syncProductQuestions($product, $productId, $args)
$values = $option->getValuesCollection();

foreach ($values as $value) {
$valueData = $this->_syncProductQuestionValue($value);
if($value) {
$valueData = $this->_syncProductQuestionValue($value);

$insertProductAnswerSQL->execute(
[
$optionData['id'],
$valueData['name'],
$valueData['pricemod'],
$valueData['skumod'],
$valueData['sort']
]
);
$insertProductAnswerSQL->execute(
[
$optionData['id'],
$valueData['name'],
$valueData['pricemod'],
$valueData['skumod'],
$valueData['sort']
]
);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name" : "codisto/codisto-connect",
"description" : "Codisto LINQ Magento 2 Extension",
"type" : "magento2-module",
"version" : "1.91.42",
"version" : "1.91.43",
"license" : [
"OSL-3.0"
],
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Codisto_Connect" schema_version="0" active="true" setup_version="1.91.42">
<module name="Codisto_Connect" schema_version="0" active="true" setup_version="1.91.43">
</module>
</config>

0 comments on commit 41f3909

Please sign in to comment.