wp_list_categories can output not well nested HTML
|Reported by:||chesio||Owned by:||SergeyBiryukov|
However,  introduced a bug that can result in not well nested output, because only the condition that optionally "opens" list item and starts new list has been altered, not the condition that optionally close both.
On a clean install (from trunk):
wp_list_categories([ 'child_of' => 1, // to have $categories empty 'hide_title_if_empty' => true, // to hide title 'show_option_none' => '', // to get only the invalid output ]);
I believe, the fix is quite straight-forward - see the patch attached.