Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Given the array
$items = array(
array(
'children'=>array(
1,
2,
3,
4
),
),
array(
'children'=>array(
5,
6,
7,
),
),
);
and theming
return theme('item_list', array('items'=>$items));
the output is doubling up
1
2
3
4
1
2
3
4
5
6
7
This happens because of missing reset of $data variable (this reset is present in default theme_item_list() implementation):
$children = array();
$data = ''; // <--- THIS WAS MISSING, CAUSING DATA TO BE APPENDED FOR EACH NEXT CHILD
if (is_array($item)) {
Comment | File | Size | Author |
---|---|---|---|
#1 | omega-Duplicated-children-items-in-omega_item_list-1878546.patch | 459 bytes | Leon Kessler |
Comments
Comment #1
Leon Kessler CreditAttribution: Leon Kessler commentedRan into the same problem.
Here's a patch, can we get this into the next 7.3 release?