While testing out my theme with WP 2.1 I noticed that the newly depreciated function list_cats does now not work as it used to.
It was defaulting to 'break' behaviour rather than 'list'
This is also true of wp_list_cats although in a different way.
if calling
wp_list_cats("title_li=");
then the display will be an UL list as expected (due to default behaviour), whereas
wp_list_cats("list=1&title_li=");
will show them with BRs ('break' behaviour), but
wp_list_cats("list=0&title_li=");
will show an UL (this is the wrong way round)
as far as the list_cats function is concerned, that template function will display a 'break' list regardless of the settings supplied, either defaulted or not...
I have traced this down to the wp_list_cats function in depreciated.php line 432
if ( !empty($r[ 'list' ]) )
$r[ 'style' ] = 'break';
this needs to be
if ( isset($r[ 'list' ]) )
$r[ 'style' ] = $r[ 'list' ] ? 'list' : 'break';
This is because the function list_cats() will call this, and $r[ 'list' ] will never be empty because it is either defaulted or set by the caller, and therefore it will be set to break.
Plus the test needs to be changed because if the parameter is set to 0 then it is empty, but still set.
I have tested this fix, and it all seems to work fine in all scenarios. (patch file attached, rev 4709)