Index: branches/5.2.x/units/product_options/product_options_helper.php =================================================================== diff -u -N -r14258 -r14702 --- branches/5.2.x/units/product_options/product_options_helper.php (.../product_options_helper.php) (revision 14258) +++ branches/5.2.x/units/product_options/product_options_helper.php (.../product_options_helper.php) (revision 14702) @@ -1,6 +1,6 @@ Conn->GetCol('SELECT ProductOptionId FROM '.TABLE_PREFIX.'ProductOptions WHERE ProductOptionId IN ('.join(',', $option_keys).') AND OptionType IN (1,3,6)'); + if ( !$option_keys ) { + return ''; + } + + $sql = 'SELECT ProductOptionId + FROM ' . TABLE_PREFIX . 'ProductOptions + WHERE ProductOptionId IN (' . join(',', $option_keys) . ') AND OptionType IN (1,3,6)'; + $included = $this->Conn->GetCol($sql); + foreach ($option_keys as $key) { - if (!in_array($key, $included)) { + if ( !in_array($key, $included) ) { unset($options[$key]); } } + return $this->OptionsSalt($options); } } \ No newline at end of file