DataobjectCache doesn't handle multi-selects

Bug #531252 reported by Yabs
6
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="selected"';

¥

Related branches

Yabs (yabs)
Changed in quam-plures:
status: New → Fix Committed
assignee: nobody → Yabs (yabs)
Yabs (yabs)
Changed in quam-plures:
status: Fix Committed → Fix Released
Daniel Hahler (blueyed)
tags: added: b2evo-cherrypick
Revision history for this message
Daniel Hahler (blueyed) wrote :

Cherrypicked into b2evo CVS HEAD for 4.x. Thanks.

Changed in b2evolution:
status: New → Fix Committed
Revision history for this message
Daniel Hahler (blueyed) wrote :

Should be released (unverified). Marking as such.

Changed in b2evolution:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.