- Patch #267203 by Rob Loach: attributes of theme_item_list can be deceiving. If you have a look at theme_item_list you see that the $attributes variable takes a NULL value. This makes you believe that it wants a string, rather then a full array of attributes. If you make the default parameter "array()" it will make the programmer expect to pass an array of attributes rather then a string of attributes.

merge-requests/26/head
Dries Buytaert 2008-06-06 01:50:20 +00:00
parent b87b7c2d01
commit 4f1af19d10
1 changed files with 1 additions and 1 deletions

View File

@ -1480,7 +1480,7 @@ function theme_mark($type = MARK_NEW) {
* @return * @return
* A string containing the list output. * A string containing the list output.
*/ */
function theme_item_list($items = array(), $title = NULL, $type = 'ul', $attributes = NULL) { function theme_item_list($items = array(), $title = NULL, $type = 'ul', $attributes = array()) {
$output = '<div class="item-list">'; $output = '<div class="item-list">';
if (isset($title)) { if (isset($title)) {
$output .= '<h3>' . $title . '</h3>'; $output .= '<h3>' . $title . '</h3>';