? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.558
diff -u -p -r1.558 theme.inc
--- includes/theme.inc	22 Dec 2009 14:47:14 -0000	1.558
+++ includes/theme.inc	27 Dec 2009 14:51:28 -0000
@@ -1926,7 +1926,8 @@ function theme_item_list($variables) {
         $data = $item;
       }
       if (count($children) > 0) {
-        $data .= theme_item_list($children, NULL, $type, $attributes); // Render nested list
+        // Render nested list.
+        $data .= theme_item_list(array('items' => $children, 'title' => NULL, 'type' => $type, 'attributes' => $attributes));
       }
       if ($i == 0) {
         $attributes['class'][] = 'first';
Index: modules/simpletest/tests/theme.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/theme.test,v
retrieving revision 1.9
diff -u -p -r1.9 theme.test
--- modules/simpletest/tests/theme.test	16 Oct 2009 08:27:41 -0000	1.9
+++ modules/simpletest/tests/theme.test	27 Dec 2009 14:51:28 -0000
@@ -93,3 +93,31 @@ class ThemeTableUnitTest extends DrupalW
     drupal_static_reset('drupal_add_js');
   }
 }
+
+/**
+ * Unit tests for theme_item_list().
+ */
+class ThemeItemListUnitTest extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Theme item list',
+      'description' => 'Test the theme_item_list() function.',
+      'group' => 'Theme',
+    );
+  }
+
+  /**
+   * Test nested list rendering.
+   */
+  function testNestedList() {
+    $items = array('a', array('data' => 'b', 'children' => array('c', 'd')), 'e');
+    $expected = '<div class="item-list"><ul><li class="first">a</li>
+<li>b<div class="item-list"><ul><li class="first">c</li>
+<li class="last">d</li>
+</ul></div></li>
+<li class="last">e</li>
+</ul></div>';
+    $output = theme('item_list', array('items' => $items, 'type' => 'ul', 'title' => NULL, 'attributes' => array()));
+    $this->assertIdentical($expected, $output, 'Nested list is rendered correctly.');
+  }
+}
