Commit 03c4f40f authored by Dries's avatar Dries

- Fixed bug #6345: drupal_attributes() adds redundant space.

parent bd27093f
......@@ -1088,12 +1088,13 @@ function url($url = NULL, $query = NULL, $fragment = NULL, $absolute = NULL) {
}
}
function drupal_attributes($attributes = NULL) {
if (is_array($attributes)) {
function drupal_attributes($attributes = array()) {
if (count($attributes)) {
$t = array();
foreach ($attributes as $key => $value) {
$t[] = "$key=\"$value\"";
}
return " ". implode($t, " ");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment