- Patch #38279 by paddy_deburca: fixed theme_item_list() not to generate an empty <ul></ul> tag when $items is empty.

4.7.x
Dries Buytaert 2005-11-24 20:08:54 +00:00
parent 350f2e5aff
commit 5f36738a11
1 changed files with 1 additions and 1 deletions

View File

@ -839,7 +839,7 @@ function theme_item_list($items = array(), $title = NULL, $type = 'ul') {
$output .= '<h3>'. $title .'</h3>';
}
if (isset($items)) {
if (!empty($items)) {
$output .= "<$type>";
foreach ($items as $item) {
$output .= '<li>'. $item .'</li>';