Commit 3ab169fc authored by Dries's avatar Dries
Browse files

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

parent 42461ed5
...@@ -1088,12 +1088,13 @@ function url($url = NULL, $query = NULL, $fragment = NULL, $absolute = NULL) { ...@@ -1088,12 +1088,13 @@ function url($url = NULL, $query = NULL, $fragment = NULL, $absolute = NULL) {
} }
} }
function drupal_attributes($attributes = NULL) { function drupal_attributes($attributes = array()) {
if (is_array($attributes)) { if (count($attributes)) {
$t = array(); $t = array();
foreach ($attributes as $key => $value) { foreach ($attributes as $key => $value) {
$t[] = "$key=\"$value\""; $t[] = "$key=\"$value\"";
} }
return " ". implode($t, " "); 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