evoteam team mailing list archive
-
evoteam team
-
Mailing list archive
-
Message #00077
[Bug 531252] Re: DataobjectCache doesn't handle multi-selects
Cherrypicked into b2evo CVS HEAD for 4.x. Thanks.
** Also affects: b2evolution
Importance: Undecided
Status: New
** Changed in: b2evolution
Status: New => Fix Committed
--
DataobjectCache doesn't handle multi-selects
https://bugs.launchpad.net/bugs/531252
You received this bug notification because you are a member of Evoteam,
which is subscribed to b2evolution.
Status in b2evolution: Fix Committed
Status in Quam Plures, as many as possible: Fix Released
Bug description:
Function get_option_list() [approx 559] incorrectly expects $default to be a single value. It can be an array when using multi-selects.
The cure is to convert $default into an array if it's a single value and then change the selected="selected" check to in_array();
function get_option_list( $default = 0, $allow_none = false, $method = 'get_name' )
{
if( !is_array( $default ) )
{
$default = array( $default );
}
......
if( in_array( $loop_Obj->ID, $default ) ) $r .= ' selected="selected"';
¥