diff options
-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, " "); } } |