diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-03-10 19:32:37 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-03-10 19:32:37 +0000 |
commit | 3ab169fc8b803424f90f76eda3979cab7fadba44 (patch) | |
tree | f49270be21527ae54e3e08f1c6dcf1735bd93dff | |
parent | 42461ed57805cfa1ee15c08d52b83aaa01e62c84 (diff) | |
download | brdo-3ab169fc8b803424f90f76eda3979cab7fadba44.tar.gz brdo-3ab169fc8b803424f90f76eda3979cab7fadba44.tar.bz2 |
- Fixed bug #6345: drupal_attributes() adds redundant space.
-rw-r--r-- | includes/common.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc index b341460b5..0264418bd 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -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, " "); } } |