DataobjectCache doesn't handle multi-selects
Bug #531252 reported by
Yabs
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Quam Plures |
Fix Released
|
Low
|
Yabs | ||
b2evolution |
Fix Released
|
Undecided
|
Unassigned |
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=
¥
Related branches
lp:~quam-plures-core/quam-plures/qp-bug-531252
Merged
into
lp:quam-plures
- EdB: Approve
-
Diff: 24 lines (+6/-1)1 file modifiedinc/_core/model/dataobjects/_dataobjectcache.class.php (+6/-1)
Changed in quam-plures: | |
status: | New → Fix Committed |
assignee: | nobody → Yabs (yabs) |
Changed in quam-plures: | |
status: | Fix Committed → Fix Released |
tags: | added: b2evo-cherrypick |
To post a comment you must log in.
Cherrypicked into b2evo CVS HEAD for 4.x. Thanks.