don't add empty classes to menu items

This commit is contained in:
Evan Prodromou 2011-07-06 11:18:53 -04:00
parent 663bc35390
commit eb430f9cb3

View File

@ -1360,9 +1360,13 @@ class Action extends HTMLOutputter // lawsuit
$classes[] = 'current';
}
$lattrs['class'] = implode(' ', $classes);
if (!empty($classes)) {
$lattrs['class'] = implode(' ', $classes);
}
(is_null($id)) ? $lattrs : $lattrs['id'] = $id;
if (!is_null($id)) {
$lattrs['id'] = $id;
}
$this->elementStart('li', $lattrs);
$attrs['href'] = $url;