Commit 91653eee authored by Sebastian Castro's avatar Sebastian Castro

Fixs non mapped option values

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