Skip to content
Snippets Groups Projects
Unverified Commit 91653eee authored by Sebastian Castro's avatar Sebastian Castro
Browse files

Fixs non mapped option values

parent 2b368b68
No related branches found
No related tags found
No related merge requests found
...@@ -80,9 +80,16 @@ class ElementJsonGenerator ...@@ -80,9 +80,16 @@ class ElementJsonGenerator
{ {
for ($i=0; $i < $optValuesLength; $i++) { for ($i=0; $i < $optValuesLength; $i++) {
$optionValue = $sortedOptionsValues[$i]; $optionValue = $sortedOptionsValues[$i];
$optionName = json_encode($options[$optionValue->getOptionId()]['name']); if (isset($options[$optionValue->getOptionId()]))
$optionsString .= $optionName . ','; {
$optionsFullJson[] = $sortedOptionsValues[$i]->toJson($optionName); $optionName = json_encode($options[$optionValue->getOptionId()]['name']);
$optionsString .= $optionName . ',';
$optionsFullJson[] = $sortedOptionsValues[$i]->toJson($optionName);
}
else
{
$element->removeOptionValue($sortedOptionsValues[$i]);
}
} }
} }
$optionsString = rtrim($optionsString, ','); $optionsString = rtrim($optionsString, ',');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment