Don't reset value to array index if it's already there

This commit is contained in:
Nathan Gray 2013-11-26 20:03:19 +00:00
parent 9af81df945
commit 52dbc208a6

View File

@ -202,7 +202,7 @@ class etemplate_widget_menupopup extends etemplate_widget
if(is_array($label)) if(is_array($label))
{ {
self::fix_encoded_options($label, false); self::fix_encoded_options($label, false);
if ($use_array_of_objects) $label['value'] = $value; if ($use_array_of_objects && !array_key_exists('value', $label)) $label['value'] = $value;
} }
else else
{ {