From: Evan Prodromou Date: Wed, 6 Jul 2011 15:18:53 +0000 (-0400) Subject: don't add empty classes to menu items X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=eb430f9cb376132a525adf196102018a12e92ef9;p=quix0rs-gnu-social.git don't add empty classes to menu items --- diff --git a/lib/action.php b/lib/action.php index 21e5f78db1..d63569cba3 100644 --- a/lib/action.php +++ b/lib/action.php @@ -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;