Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.190
diff -u -p -r1.190 install.php
--- install.php	30 Jul 2009 19:32:19 -0000	1.190
+++ install.php	31 Jul 2009 15:12:59 -0000
@@ -1544,7 +1544,7 @@ function _install_configure_form(&$form_
     '#description' => st('Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.'),
     '#required' => TRUE,
     '#weight' => -10,
-    '#attributes' => array('class' => 'username'),
+    '#attributes' => array('class' => array('username')),
   );
 
   $form['admin_account']['account']['mail'] = array('#type' => 'textfield',
@@ -1584,13 +1584,13 @@ function _install_configure_form(&$form_
     '#options' => system_time_zones(),
     '#description' => st('By default, dates in this site will be displayed in the chosen time zone.'),
     '#weight' => 5,
-    '#attributes' => array('class' => 'timezone-detect'),
+    '#attributes' => array('class' => array('timezone-detect')),
   );
 
   $form['server_settings']['clean_url'] = array(
     '#type' => 'hidden',
     '#default_value' => 0,
-    '#attributes' => array('class' => 'install'),
+    '#attributes' => array('class' => array('install')),
   );
 
   $form['update_notifications'] = array(
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.950
diff -u -p -r1.950 common.inc
--- includes/common.inc	31 Jul 2009 07:27:59 -0000	1.950
+++ includes/common.inc	31 Jul 2009 15:13:00 -0000
@@ -2218,12 +2218,7 @@ function l($text, $path, array $options 
   // Append active class.
   if (($path == $_GET['q'] || ($path == '<front>' && drupal_is_front_page())) &&
       (empty($options['language']) || $options['language']->language == $language->language)) {
-    if (isset($options['attributes']['class'])) {
-      $options['attributes']['class'] .= ' active';
-    }
-    else {
-      $options['attributes']['class'] = 'active';
-    }
+    $options['attributes']['class'][] = 'active';
   }
 
   // Remove all HTML and PHP tags from a tooltip. For best performance, we act only
@@ -3155,7 +3150,7 @@ function drupal_get_library($module, $na
  * In a situation where a single weight column is being sorted in the table, the
  * classes could be added like this (in the theme function):
  * @code
- * $form['my_elements'][$delta]['weight']['#attributes']['class'] = "my-elements-weight";
+ * $form['my_elements'][$delta]['weight']['#attributes']['class'] = array('my-elements-weight');
  * @endcode
  *
  * Each row of the table must also have a class of "draggable" in order to enable the
@@ -3164,7 +3159,7 @@ function drupal_get_library($module, $na
  * $row = array(...);
  * $rows[] = array(
  *   'data' => $row,
- *   'class' => 'draggable',
+ *   'class' => array('draggable'),
  * );
  * @endcode
  *
@@ -3182,7 +3177,7 @@ function drupal_get_library($module, $na
  * the block regions on the admin/structure/block page), a separate subgroup class
  * must also be added to differentiate the groups.
  * @code
- * $form['my_elements'][$region][$delta]['weight']['#attributes']['class'] = "my-elements-weight my-elements-weight-" . $region;
+ * $form['my_elements'][$region][$delta]['weight']['#attributes']['class'] = array('my-elements-weight', 'my-elements-weight-' . $region);
  * @endcode
  *
  * $group is still 'my-element-weight', and the additional $subgroup variable
@@ -4149,7 +4144,7 @@ function drupal_common_theme() {
       'arguments' => array('display' => NULL),
     ),
     'links' => array(
-      'arguments' => array('links' => NULL, 'attributes' => array('class' => 'links')),
+      'arguments' => array('links' => NULL, 'attributes' => array('class' => array('links'))),
     ),
     'image' => array(
       'arguments' => array('path' => NULL, 'alt' => '', 'title' => '', 'attributes' => array(), 'getsize' => TRUE),
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.354
diff -u -p -r1.354 form.inc
--- includes/form.inc	28 Jul 2009 12:13:46 -0000	1.354
+++ includes/form.inc	31 Jul 2009 15:13:00 -0000
@@ -1582,12 +1582,12 @@ function theme_fieldset($element) {
     drupal_add_js('misc/collapse.js');
 
     if (!isset($element['#attributes']['class'])) {
-      $element['#attributes']['class'] = '';
+      $element['#attributes']['class'] = array();
     }
 
-    $element['#attributes']['class'] .= ' collapsible';
+    $element['#attributes']['class'][] = 'collapsible';
     if (!empty($element['#collapsed'])) {
-      $element['#attributes']['class'] .= ' collapsed';
+      $element['#attributes']['class'][] = 'collapsed';
     }
   }
   $element['#attributes']['id'] = $element['#id'];
@@ -1634,8 +1634,8 @@ function theme_radio($element) {
  */
 function theme_radios($element) {
   $class = 'form-radios';
-  if (isset($element['#attributes']['class'])) {
-    $class .= ' ' . $element['#attributes']['class'];
+  if (!empty($element['#attributes']['class'])) {
+    $class .= ' ' . implode(' ', $element['#attributes']['class']);
   }
   $element['#children'] = '<div class="' . $class . '">' . (!empty($element['#children']) ? $element['#children'] : '') . '</div>';
 
@@ -1651,14 +1651,14 @@ function form_process_password_confirm($
     '#title' => t('Password'),
     '#value' => empty($element['#value']) ? NULL : $element['#value']['pass1'],
     '#required' => $element['#required'],
-    '#attributes' => array('class' => 'password-field'),
+    '#attributes' => array('class' => array('password-field')),
   );
   $element['pass2'] =  array(
     '#type' => 'password',
     '#title' => t('Confirm password'),
     '#value' => empty($element['#value']) ? NULL : $element['#value']['pass2'],
     '#required' => $element['#required'],
-    '#attributes' => array('class' => 'password-confirm'),
+    '#attributes' => array('class' => array('password-confirm')),
   );
   $element['#element_validate'] = array('password_confirm_validate');
   $element['#tree'] = TRUE;
@@ -2095,8 +2095,8 @@ function theme_checkbox($element) {
  */
 function theme_checkboxes($element) {
   $class = 'form-checkboxes';
-  if (isset($element['#attributes']['class'])) {
-    $class .= ' ' . $element['#attributes']['class'];
+  if (!empty($element['#attributes']['class'])) {
+    $class .= ' ' . implode(' ', $element['#attributes']['class']);
   }
   $element['#children'] = '<div class="' . $class . '">' . (!empty($element['#children']) ? $element['#children'] : '') . '</div>';
 
@@ -2158,9 +2158,9 @@ function form_process_checkboxes($elemen
  * @code
  * $options = array();
  * $options[0]['title'] = "A red row"
- * $options[0]['#attributes'] = array ('class' => 'red-row');
+ * $options[0]['#attributes'] = array ('class' => array('red-row'));
  * $options[1]['title'] = "A blue row"
- * $options[1]['#attributes'] = array ('class' => 'blue-row');
+ * $options[1]['#attributes'] = array ('class' => array('blue-row'));
  *
  * $form['myselector'] = array (
  * '#type' => 'tableselect',
@@ -2387,7 +2387,7 @@ function form_process_vertical_tabs($ele
   $element[$name . '__active_tab'] = array(
     '#type' => 'hidden',
     '#default_value' => $element['#default_tab'],
-    '#attributes' => array('class' => 'vertical-tabs-active-tab'),
+    '#attributes' => array('class' => array('vertical-tabs-active-tab')),
   );
 
   return $element;
@@ -2423,13 +2423,7 @@ function theme_submit($element) {
  * @ingroup themeable
  */
 function theme_button($element) {
-  // Make sure not to overwrite classes.
-  if (isset($element['#attributes']['class'])) {
-    $element['#attributes']['class'] = 'form-' . $element['#button_type'] . ' ' . $element['#attributes']['class'];
-  }
-  else {
-    $element['#attributes']['class'] = 'form-' . $element['#button_type'];
-  }
+  $element['#attributes']['class'][] = 'form-' . $element['#button_type'];
 
   return '<input type="submit" ' . (empty($element['#name']) ? '' : 'name="' . $element['#name'] . '" ') . 'id="' . $element['#id'] . '" value="' . check_plain($element['#value']) . '" ' . drupal_attributes($element['#attributes']) . " />\n";
 }
@@ -2440,13 +2434,7 @@ function theme_button($element) {
  * @ingroup themeable
  */
 function theme_image_button($element) {
-  // Make sure not to overwrite classes.
-  if (isset($element['#attributes']['class'])) {
-    $element['#attributes']['class'] = 'form-' . $element['#button_type'] . ' ' . $element['#attributes']['class'];
-  }
-  else {
-    $element['#attributes']['class'] = 'form-' . $element['#button_type'];
-  }
+  $element['#attributes']['class'] = 'form-' . $element['#button_type'];
 
   return '<input type="image" name="' . $element['#name'] . '" ' .
     (!empty($element['#value']) ? ('value="' . check_plain($element['#value']) . '" ') : '') .
@@ -2684,16 +2672,18 @@ function theme_form_element($element) {
  *   Array of new class names to be added.
  */
 function _form_set_class(&$element, $class = array()) {
+  if (!empty($class)) {
+    if (!isset($element['#attributes']['class'])) {
+      $element['#attributes']['class'] = array();
+    }
+    $element['#attributes']['class'] = array_merge($element['#attributes']['class'], $class);
+  }
   if ($element['#required']) {
-    $class[] = 'required';
+    $element['#attributes']['class'][] = 'required';
   }
   if (form_get_error($element)) {
-    $class[] = 'error';
-  }
-  if (isset($element['#attributes']['class'])) {
-    $class[] = $element['#attributes']['class'];
+    $element['#attributes']['class'][] = 'error';
   }
-  $element['#attributes']['class'] = implode(' ', $class);
 }
 
 /**
Index: includes/locale.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/locale.inc,v
retrieving revision 1.221
diff -u -p -r1.221 locale.inc
--- includes/locale.inc	30 Jul 2009 08:40:22 -0000	1.221
+++ includes/locale.inc	31 Jul 2009 15:13:00 -0000
@@ -46,7 +46,7 @@ function locale_languages_overview_form(
     $form['weight'][$langcode] = array(
       '#type' => 'weight',
       '#default_value' => $language->weight,
-      '#attributes' => array('class' => 'language-order-weight'),
+      '#attributes' => array('class' => array('language-order-weight')),
     );
     $form['name'][$langcode] = array('#markup' => check_plain($language->name));
     $form['native'][$langcode] = array('#markup' => check_plain($language->native));
@@ -91,7 +91,7 @@ function theme_locale_languages_overview
           drupal_render($form['weight'][$key]),
           l(t('edit'), 'admin/international/language/edit/' . $key) . (($key != 'en' && $key != $default->language) ? ' ' . l(t('delete'), 'admin/international/language/delete/' . $key) : '')
         ),
-        'class' => 'draggable'
+        'class' => array('draggable'),
       );
     }
   }
@@ -2305,8 +2305,8 @@ function _locale_translate_seek() {
       array('data' => check_plain(truncate_utf8($string['source'], 150, FALSE, TRUE)) . '<br /><small>' . $string['location'] . '</small>'),
       $string['context'],
       array('data' => _locale_translate_language_list($string['languages'], $limit_language), 'align' => 'center'),
-      array('data' => l(t('edit'), "admin/international/translate/edit/$lid", array('query' => drupal_get_destination())), 'class' => 'nowrap'),
-      array('data' => l(t('delete'), "admin/international/translate/delete/$lid", array('query' => drupal_get_destination())), 'class' => 'nowrap'),
+      array('data' => l(t('edit'), "admin/international/translate/edit/$lid", array('query' => drupal_get_destination())), 'class' => array('nowrap')),
+      array('data' => l(t('delete'), "admin/international/translate/delete/$lid", array('query' => drupal_get_destination())), 'class' => array('nowrap')),
     );
   }
 
Index: includes/pager.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/pager.inc,v
retrieving revision 1.68
diff -u -p -r1.68 pager.inc
--- includes/pager.inc	28 Jul 2009 19:18:05 -0000	1.68
+++ includes/pager.inc	31 Jul 2009 15:13:00 -0000
@@ -296,13 +296,13 @@ function theme_pager($tags = array(), $e
   if ($pager_total[$element] > 1) {
     if ($li_first) {
       $items[] = array(
-        'class' => 'pager-first',
+        'class' => array('pager-first'),
         'data' => $li_first,
       );
     }
     if ($li_previous) {
       $items[] = array(
-        'class' => 'pager-previous',
+        'class' => array('pager-previous'),
         'data' => $li_previous,
       );
     }
@@ -311,7 +311,7 @@ function theme_pager($tags = array(), $e
     if ($i != $pager_max) {
       if ($i > 1) {
         $items[] = array(
-          'class' => 'pager-ellipsis',
+          'class' => array('pager-ellipsis'),
           'data' => '…',
         );
       }
@@ -319,26 +319,26 @@ function theme_pager($tags = array(), $e
       for (; $i <= $pager_last && $i <= $pager_max; $i++) {
         if ($i < $pager_current) {
           $items[] = array(
-            'class' => 'pager-item',
+            'class' => array('pager-item'),
             'data' => theme('pager_previous', $i, $element, ($pager_current - $i), $parameters),
           );
         }
         if ($i == $pager_current) {
           $items[] = array(
-            'class' => 'pager-current',
+            'class' => array('pager-current'),
             'data' => $i,
           );
         }
         if ($i > $pager_current) {
           $items[] = array(
-            'class' => 'pager-item',
+            'class' => array('pager-item'),
             'data' => theme('pager_next', $i, $element, ($i - $pager_current), $parameters),
           );
         }
       }
       if ($i < $pager_max) {
         $items[] = array(
-          'class' => 'pager-ellipsis',
+          'class' => array('pager-ellipsis'),
           'data' => '…',
         );
       }
@@ -346,17 +346,17 @@ function theme_pager($tags = array(), $e
     // End generation.
     if ($li_next) {
       $items[] = array(
-        'class' => 'pager-next',
+        'class' => array('pager-next'),
         'data' => $li_next,
       );
     }
     if ($li_last) {
       $items[] = array(
-        'class' => 'pager-last',
+        'class' => array('pager-last'),
         'data' => $li_last,
       );
     }
-    return theme('item_list', $items, NULL, 'ul', array('class' => 'pager'));
+    return theme('item_list', $items, NULL, 'ul', array('class' => array('pager')));
   }
 }
 
Index: includes/tablesort.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/tablesort.inc,v
retrieving revision 1.51
diff -u -p -r1.51 tablesort.inc
--- includes/tablesort.inc	22 May 2009 11:33:17 -0000	1.51
+++ includes/tablesort.inc	31 Jul 2009 15:13:00 -0000
@@ -185,12 +185,7 @@ function tablesort_header($cell, $header
     $title = t('sort by @s', array('@s' => $cell['data']));
     if ($cell['data'] == $ts['name']) {
       $ts['sort'] = (($ts['sort'] == 'asc') ? 'desc' : 'asc');
-      if (isset($cell['class'])) {
-        $cell['class'] .= ' active';
-      }
-      else {
-        $cell['class'] = 'active';
-      }
+      $cell['class'][] = 'active';
       $image = theme('tablesort_indicator', $ts['sort']);
     }
     else {
@@ -228,15 +223,10 @@ function tablesort_header($cell, $header
 function tablesort_cell($cell, $header, $ts, $i) {
   if (isset($header[$i]['data']) && $header[$i]['data'] == $ts['name'] && !empty($header[$i]['field'])) {
     if (is_array($cell)) {
-      if (isset($cell['class'])) {
-        $cell['class'] .= ' active';
-      }
-      else {
-        $cell['class'] = 'active';
-      }
+      $cell['class'][] = 'active';
     }
     else {
-      $cell = array('data' => $cell, 'class' => 'active');
+      $cell = array('data' => $cell, 'class' => array('active'));
     }
   }
   return $cell;
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.501
diff -u -p -r1.501 theme.inc
--- includes/theme.inc	30 Jul 2009 19:57:09 -0000	1.501
+++ includes/theme.inc	31 Jul 2009 15:13:01 -0000
@@ -1267,7 +1267,7 @@ function theme_status_messages($display 
  * @return
  *   A string containing an unordered list of links.
  */
-function theme_links($links, $attributes = array('class' => 'links')) {
+function theme_links($links, $attributes = array('class' => array('links'))) {
   global $language;
   $output = '';
 
@@ -1278,18 +1278,18 @@ function theme_links($links, $attributes
     $i = 1;
 
     foreach ($links as $key => $link) {
-      $class = $key;
+      $class = array($key);
 
       // Add first, last and active classes to the list of links to help out themers.
       if ($i == 1) {
-        $class .= ' first';
+        $class[] = 'first';
       }
       if ($i == $num_links) {
-        $class .= ' last';
+        $class[] = 'last';
       }
       if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' && drupal_is_front_page()))
           && (empty($link['language']) || $link['language']->language == $language->language)) {
-        $class .= ' active';
+        $class[] = 'active';
       }
       $output .= '<li' . drupal_attributes(array('class' => $class)) . '>';
 
@@ -1397,7 +1397,7 @@ function theme_submenu($links) {
  *     ),
  *     // Row with attributes on the row and some of its cells.
  *     array(
- *       'data' => array('Cell 1', array('data' => 'Cell 2', 'colspan' => 2)), 'class' => 'funky'
+ *       'data' => array('Cell 1', array('data' => 'Cell 2', 'colspan' => 2)), 'class' => array('funky')
  *     )
  *   );
  *   @endverbatim
@@ -1419,17 +1419,17 @@ function theme_submenu($links) {
  *     // COLGROUP with one COL element.
  *     array(
  *       array(
- *         'class' => 'funky', // Attribute for the COL element.
+ *         'class' => array('funky'), // Attribute for the COL element.
  *       ),
  *     ),
  *     // Colgroup with attributes and inner COL elements.
  *     array(
  *       'data' => array(
  *         array(
- *           'class' => 'funky', // Attribute for the COL element.
+ *           'class' => array('funky'), // Attribute for the COL element.
  *         ),
  *       ),
- *       'class' => 'jazzy', // Attribute for the COLGROUP element.
+ *       'class' => array('jazzy'), // Attribute for the COLGROUP element.
  *     ),
  *   );
  *   @endverbatim
@@ -1448,7 +1448,7 @@ function theme_table($header, $rows, $at
     drupal_add_js('misc/tableheader.js');
     // Add 'sticky-enabled' class to the table to identify it for JS.
     // This is needed to target tables constructed by this function.
-    $attributes['class'] = empty($attributes['class']) ? 'sticky-enabled' : ($attributes['class'] . ' sticky-enabled');
+    $attributes['class'][] = 'sticky-enabled';
   }
 
   $output = '<table' . drupal_attributes($attributes) . ">\n";
@@ -1534,12 +1534,7 @@ function theme_table($header, $rows, $at
       if (count($cells)) {
         // Add odd/even class
         $class = $flip[$class];
-        if (isset($attributes['class'])) {
-          $attributes['class'] .= ' ' . $class;
-        }
-        else {
-          $attributes['class'] = $class;
-        }
+        $attributes['class'][] = $class;
 
         // Build row
         $output .= ' <tr' . drupal_attributes($attributes) . '>';
@@ -1564,7 +1559,7 @@ function theme_table($header, $rows, $at
 function theme_table_select_header_cell() {
   drupal_add_js('misc/tableselect.js');
 
-  return array('class' => 'select-all');
+  return array('class' => array('select-all'));
 }
 
 /**
@@ -1656,10 +1651,10 @@ function theme_item_list($items = array(
         $data .= theme_item_list($children, NULL, $type, $attributes); // Render nested list
       }
       if ($i == 0) {
-        $attributes['class'] = empty($attributes['class']) ? 'first' : ($attributes['class'] . ' first');
+        $attributes['class'][] = 'first';
       }
       if ($i == $num_items - 1) {
-        $attributes['class'] = empty($attributes['class']) ? 'last' : ($attributes['class'] . ' last');
+        $attributes['class'][] = 'last';
       }
       $output .= '<li' . drupal_attributes($attributes) . '>' . $data . "</li>\n";
     }
Index: modules/aggregator/aggregator.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.admin.inc,v
retrieving revision 1.36
diff -u -p -r1.36 aggregator.admin.inc
--- modules/aggregator/aggregator.admin.inc	30 Jul 2009 19:24:20 -0000	1.36
+++ modules/aggregator/aggregator.admin.inc	31 Jul 2009 15:13:02 -0000
@@ -30,7 +30,7 @@ function aggregator_view() {
     $rows[] = array(l($feed->title, "aggregator/sources/$feed->fid"), format_plural($feed->items, '1 item', '@count items'), ($feed->checked ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $feed->checked))) : t('never')), ($feed->checked && $feed->refresh ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - REQUEST_TIME))) : t('never')), l(t('edit'), "admin/settings/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/settings/aggregator/remove/$feed->fid"), l(t('update items'), "admin/settings/aggregator/update/$feed->fid"));
   }
   if (empty($rows)) {
-    $rows[] = array(array('data' => t('No feeds available. <a href="@link">Add feed</a>.', array('@link' => url('admin/settings/aggregator/add/feed'))), 'colspan' => '5', 'class' => 'message'));
+    $rows[] = array(array('data' => t('No feeds available. <a href="@link">Add feed</a>.', array('@link' => url('admin/content/aggregator/add/feed'))), 'colspan' => '5', 'class' => array('message')));
   }
   $output .= theme('table', $header, $rows);
 
@@ -44,7 +44,7 @@ function aggregator_view() {
     $rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '@count items'), l(t('edit'), "admin/settings/aggregator/edit/category/$category->cid"));
   }
   if (empty($rows)) {
-    $rows[] = array(array('data' => t('No categories available. <a href="@link">Add category</a>.', array('@link' => url('admin/settings/aggregator/add/category'))), 'colspan' => '5', 'class' => 'message'));
+    $rows[] = array(array('data' => t('No categories available. <a href="@link">Add category</a>.', array('@link' => url('admin/content/aggregator/add/category'))), 'colspan' => '5', 'class' => array('message')));
   }
   $output .= theme('table', $header, $rows);
 
Index: modules/aggregator/aggregator.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.pages.inc,v
retrieving revision 1.30
diff -u -p -r1.30 aggregator.pages.inc
--- modules/aggregator/aggregator.pages.inc	30 Jul 2009 19:24:20 -0000	1.30
+++ modules/aggregator/aggregator.pages.inc	31 Jul 2009 15:13:02 -0000
@@ -242,7 +242,7 @@ function theme_aggregator_categorize_ite
     foreach (element_children($form['items']) as $key) {
       $rows[] = array(
         drupal_render($form['items'][$key]),
-        array('data' => drupal_render($form['categories'][$key]), 'class' => 'categorize-item'),
+        array('data' => drupal_render($form['categories'][$key]), 'class' => array('categorize-item')),
       );
     }
   }
Index: modules/block/block.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v
retrieving revision 1.47
diff -u -p -r1.47 block.admin.inc
--- modules/block/block.admin.inc	20 Jul 2009 18:51:32 -0000	1.47
+++ modules/block/block.admin.inc	31 Jul 2009 15:13:02 -0000
@@ -491,12 +491,12 @@ function template_preprocess_block_admin
       $region = $block['region']['#default_value'];
 
       // Set special classes needed for table drag and drop.
-      $variables['form'][$i]['region']['#attributes']['class'] = 'block-region-select block-region-' . $region;
-      $variables['form'][$i]['weight']['#attributes']['class'] = 'block-weight block-weight-' . $region;
+      $variables['form'][$i]['region']['#attributes']['class'] = array('block-region-select', 'block-region-' . $region);
+      $variables['form'][$i]['weight']['#attributes']['class'] = array('block-weight', 'block-weight-' . $region);
 
       $variables['block_listing'][$region][$i] = new stdClass();
-      $variables['block_listing'][$region][$i]->row_class = isset($block['#attributes']['class']) ? $block['#attributes']['class'] : '';
-      $variables['block_listing'][$region][$i]->block_modified = isset($block['#attributes']['class']) && strpos($block['#attributes']['class'], 'block-modified') !== FALSE;
+      $variables['block_listing'][$region][$i]->row_class = !empty($block['#attributes']['class']) ? implode(' ', $block['#attributes']['class']) : '';
+      $variables['block_listing'][$region][$i]->block_modified = !empty($block['#attributes']['class']) && in_array('block-modified', $block['#attributes']['class']);
       $variables['block_listing'][$region][$i]->block_title =  drupal_render($block['info']);
       $variables['block_listing'][$region][$i]->region_select = drupal_render($block['region']) . drupal_render($block['theme']);
       $variables['block_listing'][$region][$i]->weight_select = drupal_render($block['weight']);
Index: modules/blog/blog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.module,v
retrieving revision 1.328
diff -u -p -r1.328 blog.module
--- modules/blog/blog.module	20 Jul 2009 18:51:32 -0000	1.328
+++ modules/blog/blog.module	31 Jul 2009 15:13:02 -0000
@@ -50,7 +50,7 @@ function blog_user_view(&$edit, &$user, 
       '#type' => 'user_profile_item',
       '#title' => t('Blog'),
       '#markup' => l(t('View recent blog entries'), "blog/$user->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => $user->name))))),
-      '#attributes' => array('class' => 'blog'),
+      '#attributes' => array('class' => array('blog')),
     );
   }
 }
@@ -101,7 +101,7 @@ function blog_node_view($node, $build_mo
       $node->content['links']['blog'] = array(
         '#theme' => 'links',
         '#links' => $links,
-        '#attributes' => array('class' => 'links inline'),
+        '#attributes' => array('class' => array('links', 'inline')),
       );
     }
   }
Index: modules/book/book.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.admin.inc,v
retrieving revision 1.20
diff -u -p -r1.20 book.admin.inc
--- modules/book/book.admin.inc	4 Jun 2009 03:33:27 -0000	1.20
+++ modules/book/book.admin.inc	31 Jul 2009 15:13:02 -0000
@@ -236,9 +236,9 @@ function theme_book_admin_table($form) {
     $href = $form[$key]['href']['#value'];
 
     // Add special classes to be used with tabledrag.js.
-    $form[$key]['plid']['#attributes']['class'] = 'book-plid';
-    $form[$key]['mlid']['#attributes']['class'] = 'book-mlid';
-    $form[$key]['weight']['#attributes']['class'] = 'book-weight';
+    $form[$key]['plid']['#attributes']['class'] = array('book-plid');
+    $form[$key]['mlid']['#attributes']['class'] = array('book-mlid');
+    $form[$key]['weight']['#attributes']['class'] = array('book-weight');
 
     $data = array(
       theme('indentation', $form[$key]['depth']['#value'] - 2) . drupal_render($form[$key]['title']),
@@ -252,7 +252,7 @@ function theme_book_admin_table($form) {
     if (isset($form[$key]['#attributes'])) {
       $row = array_merge($row, $form[$key]['#attributes']);
     }
-    $row['class'] = empty($row['class']) ? 'draggable' : $row['class'] . ' draggable';
+    $row['class'][] = 'draggable';
     $rows[] = $row;
   }
 
Index: modules/book/book.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.module,v
retrieving revision 1.501
diff -u -p -r1.501 book.module
--- modules/book/book.module	30 Jul 2009 19:24:20 -0000	1.501
+++ modules/book/book.module	31 Jul 2009 15:13:02 -0000
@@ -91,7 +91,7 @@ function book_node_view_link($node, $bui
     $node->content['links']['book'] = array(
       '#theme' => 'links',
       '#links' => $links,
-      '#attributes' => array('class' => 'links inline'),
+      '#attributes' => array('class' => array('links', 'inline')),
     );
   }
 }
@@ -296,7 +296,7 @@ function book_block_save($delta = '', $e
  * @ingroup themeable
  */
 function theme_book_title_link($link) {
-  $link['options']['attributes']['class'] =  'book-title';
+  $link['options']['attributes']['class'] = array('book-title');
 
   return l($link['title'], $link['href'], $link['options']);
 }
@@ -416,7 +416,7 @@ function _book_parent_select($book_link)
       '#default_value' => $book_link['plid'],
       '#description' => t('The parent page in the book. The maximum depth for a book and all child pages is !maxdepth. Some pages in the selected book may not be available as parents if selecting them would exceed this limit.', array('!maxdepth' => MENU_MAX_DEPTH)),
       '#options' => book_toc($book_link['bid'], $book_link['parent_depth_limit'], array($book_link['mlid'])),
-      '#attributes' => array('class' => 'book-title-select'),
+      '#attributes' => array('class' => array('book-title-select')),
     );
   }
 
@@ -439,7 +439,7 @@ function _book_add_form_elements(&$form,
     '#group' => 'additional_settings',
     '#attached_js' => array(drupal_get_path('module', 'book') . '/book.js'),
     '#tree' => TRUE,
-    '#attributes' => array('class' => 'book-outline-form'),
+    '#attributes' => array('class' => array('book-outline-form')),
   );
   foreach (array('menu_name', 'mlid', 'nid', 'router_path', 'has_children', 'options', 'module', 'original_bid', 'parent_depth_limit') as $key) {
     $form['book'][$key] = array(
@@ -489,7 +489,7 @@ function _book_add_form_elements(&$form,
     '#access' => (bool)$options,
     '#description' => t('Your page will be a part of the selected book.'),
     '#weight' => -5,
-    '#attributes' => array('class' => 'book-title-select'),
+    '#attributes' => array('class' => array('book-title-select')),
     '#ahah' => array(
       'path' => 'book/js/form',
       'wrapper' => 'edit-book-plid-wrapper',
Index: modules/book/book.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.test,v
retrieving revision 1.13
diff -u -p -r1.13 book.test
--- modules/book/book.test	20 Jul 2009 18:51:32 -0000	1.13
+++ modules/book/book.test	31 Jul 2009 15:13:02 -0000
@@ -110,15 +110,15 @@ class BookTestCase extends DrupalWebTest
 
     // Check previous, up, and next links.
     if ($previous) {
-      $this->assertRaw(l('‹ ' . $previous->title, 'node/' . $previous->nid, array('attributes' => array('class' => 'page-previous', 'title' => t('Go to previous page')))), t('Prevoius page link found.'));
+      $this->assertRaw(l('‹ ' . $previous->title, 'node/' . $previous->nid, array('attributes' => array('class' => array('page-previous'), 'title' => t('Go to previous page')))), t('Prevoius page link found.'));
     }
 
     if ($up) {
-      $this->assertRaw(l('up', 'node/' . $up->nid, array('attributes' => array('class' => 'page-up', 'title' => t('Go to parent page')))), t('Up page link found.'));
+      $this->assertRaw(l('up', 'node/' . $up->nid, array('attributes' => array('class' => array('page-up'), 'title' => t('Go to parent page')))), t('Up page link found.'));
     }
 
     if ($next) {
-      $this->assertRaw(l($next->title . ' ›', 'node/' . $next->nid, array('attributes' => array('class' => 'page-next', 'title' => t('Go to next page')))), t('Next page link found.'));
+      $this->assertRaw(l($next->title . ' ›', 'node/' . $next->nid, array('attributes' => array('class' => array('page-next'), 'title' => t('Go to next page')))), t('Next page link found.'));
     }
 
     // Compute the expected breadcrumb.
Index: modules/color/color.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/color/color.module,v
retrieving revision 1.63
diff -u -p -r1.63 color.module
--- modules/color/color.module	31 Jul 2009 11:20:42 -0000	1.63
+++ modules/color/color.module	31 Jul 2009 15:13:02 -0000
@@ -74,7 +74,7 @@ function _color_theme_select_form_alter(
   foreach (element_children($form) as $theme) {
     if ($screenshot = variable_get('color_' . $theme . '_screenshot')) {
       if (isset($form[$theme]['screenshot'])) {
-        $form[$theme]['screenshot']['#markup'] = theme('image', $screenshot, '', '', array('class' => 'screenshot'), FALSE);
+        $form[$theme]['screenshot']['#markup'] = theme('image', $screenshot, '', '', array('class' => array('screenshot')), FALSE);
       }
     }
   }
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.744
diff -u -p -r1.744 comment.module
--- modules/comment/comment.module	30 Jul 2009 19:24:20 -0000	1.744
+++ modules/comment/comment.module	31 Jul 2009 15:13:02 -0000
@@ -515,7 +515,7 @@ function comment_node_view($node, $build
     $node->content['links']['comment'] = array(
       '#theme' => 'links',
       '#links' => $links,
-      '#attributes' => array('class' => 'links inline'),
+      '#attributes' => array('class' => array('links', 'inline')),
     );
 
     // Only append comments when we are building a node on its own node detail
@@ -786,7 +786,7 @@ function comment_build_content($comment,
     $comment->content['links']['comment'] = array(
       '#theme' => 'links',
       '#links' => comment_links($comment),
-      '#attributes' => array('class' => 'links inline'),
+      '#attributes' => array('class' => array('links', 'inline')),
     );
   }
 
Index: modules/dblog/dblog.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.admin.inc,v
retrieving revision 1.23
diff -u -p -r1.23 dblog.admin.inc
--- modules/dblog/dblog.admin.inc	29 Jul 2009 06:39:34 -0000	1.23
+++ modules/dblog/dblog.admin.inc	31 Jul 2009 15:13:02 -0000
@@ -84,7 +84,7 @@ function dblog_overview() {
         $dblog->link,
       ),
       // Attributes for tr
-      'class' => "dblog-" . preg_replace('/[^a-z]/i', '-', $dblog->type) . ' ' . $classes[$dblog->severity]
+      'class' => array('dblog-' . preg_replace('/[^a-z]/i', '-', $dblog->type), $classes[$dblog->severity]),
     );
   }
 
@@ -196,7 +196,7 @@ function dblog_event($id) {
     $build['dblog_table'] = array(
       '#theme' => 'table', 
       '#rows' => $rows, 
-      '#attributes' => array('class' => 'dblog-event'),
+      '#attributes' => array('class' => array('dblog-event')),
     );
     return $build;
   }
Index: modules/field/field.form.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.form.inc,v
retrieving revision 1.12
diff -u -p -r1.12 field.form.inc
--- modules/field/field.form.inc	27 Jul 2009 20:19:20 -0000	1.12
+++ modules/field/field.form.inc	31 Jul 2009 15:13:02 -0000
@@ -201,7 +201,7 @@ function field_multiple_value_form($fiel
         // the relevant field using these entries.
         '#field_name' => $field_name,
         '#bundle' => $instance['bundle'],
-        '#attributes' => array('class' => 'field-add-more-submit'),
+        '#attributes' => array('class' => array('field-add-more-submit')),
       );
     }
   }
@@ -226,7 +226,7 @@ function theme_field_multiple_value_form
       array(
         'data' => '<label>' . t('!title: !required', array('!title' => $element['#title'], '!required' => $required)) . "</label>",
         'colspan' => 2,
-        'class' => 'field-label',
+        'class' => array('field-label'),
       ),
       t('Order'),
     );
@@ -247,21 +247,21 @@ function theme_field_multiple_value_form
 
     // Add the items as table rows.
     foreach ($items as $key => $item) {
-      $item['_weight']['#attributes']['class'] = $order_class;
+      $item['_weight']['#attributes']['class'] = array($order_class);
       $delta_element = drupal_render($item['_weight']);
       $cells = array(
-        array('data' => '', 'class' => 'field-multiple-drag'),
+        array('data' => '', 'class' => array('field-multiple-drag')),
         drupal_render($item),
-        array('data' => $delta_element, 'class' => 'delta-order'),
+        array('data' => $delta_element, 'class' => array('delta-order')),
       );
       $rows[] = array(
         'data' => $cells,
-        'class' => 'draggable',
+        'class' => array('draggable'),
       );
     }
 
     $output = '<div class="form-item">';
-    $output .= theme('table', $header, $rows, array('id' => $table_id, 'class' => 'field-multiple-table'));
+    $output .= theme('table', $header, $rows, array('id' => $table_id, 'class' => array('field-multiple-table')));
     $output .= $element['#description'] ? '<div class="description">' . $element['#description'] . '</div>' : '';
     $output .= '<div class="clearfix">' . drupal_render($add_more_button) . '</div>';
     $output .= '</div>';
Index: modules/field/modules/number/number.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/number/number.module,v
retrieving revision 1.10
diff -u -p -r1.10 number.module
--- modules/field/modules/number/number.module	28 May 2009 16:44:06 -0000	1.10
+++ modules/field/modules/number/number.module	31 Jul 2009 15:13:02 -0000
@@ -314,7 +314,7 @@ function number_elements_process($elemen
     // for some configurations where all characters won't fit in input field.
     '#size' => $field['type'] == 'number_decimal' ? $field['settings']['precision'] + 2 : 12,
     '#maxlength' => $field['type'] == 'number_decimal' ? $field['settings']['precision'] : 10,
-    '#attributes' => array('class' => 'number'),
+    '#attributes' => array('class' => array('number')),
     // The following values were set by the Field module and need
     // to be passed down to the nested element.
     '#title' => $element['#title'],
@@ -434,4 +434,4 @@ function number_decimal_validate($elemen
  */
 function theme_number($element) {
   return $element['#children'];
-}
\ No newline at end of file
+}
Index: modules/field/modules/text/text.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/text/text.module,v
retrieving revision 1.15
diff -u -p -r1.15 text.module
--- modules/field/modules/text/text.module	3 Jul 2009 18:19:29 -0000	1.15
+++ modules/field/modules/text/text.module	31 Jul 2009 15:13:02 -0000
@@ -613,7 +613,7 @@ function text_textfield_elements_process
     '#default_value' => isset($element['#value'][$field_key]) ? $element['#value'][$field_key] : NULL,
     '#autocomplete_path' => $element['#autocomplete_path'],
     '#size' => $instance['widget']['settings']['size'],
-    '#attributes' => array('class' => 'text'),
+    '#attributes' => array('class' => array('text')),
     '#title' => $element['#title'],
     '#description' => $element['#description'],
     '#required' => $element['#required'],
@@ -758,7 +758,7 @@ function theme_text_textarea_with_summar
     $fieldset = array(
       '#title' => $element['#title'],
       '#value' => $element['#children'],
-      '#attributes' => array('class' => 'text-textarea'),
+      '#attributes' => array('class' => array('text-textarea')),
       '#id' => str_replace('_', '-', $element['#field_name']) . '-summary-wrapper',
     );
     return theme('fieldset', $fieldset);
Index: modules/filter/filter.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.admin.inc,v
retrieving revision 1.30
diff -u -p -r1.30 filter.admin.inc
--- modules/filter/filter.admin.inc	12 Jun 2009 08:39:37 -0000	1.30
+++ modules/filter/filter.admin.inc	31 Jul 2009 15:13:02 -0000
@@ -68,7 +68,7 @@ function theme_filter_admin_overview($fo
   $rows = array();
   foreach ($form as $id => $element) {
     if (isset($element['roles']) && is_array($element['roles'])) {
-      $element['weight']['#attributes']['class'] = 'text-format-order-weight';
+      $element['weight']['#attributes']['class'] = array('text-format-order-weight');
       $rows[] = array(
         'data' => array(
           check_plain($element['name']['#markup']),
@@ -78,7 +78,7 @@ function theme_filter_admin_overview($fo
           drupal_render($element['configure']),
           drupal_render($element['delete']),
         ),
-        'class' => 'draggable',
+        'class' => array('draggable'),
       );
       unset($form[$id]);
     }
@@ -414,10 +414,10 @@ function theme_filter_admin_order($form)
   foreach (element_children($form['names']) as $id) {
     // Don't take form control structures.
     if (is_array($form['names'][$id])) {
-      $form['weights'][$id]['#attributes']['class'] = 'filter-order-weight';
+      $form['weights'][$id]['#attributes']['class'] = array('filter-order-weight');
       $rows[] = array(
         'data' => array(drupal_render($form['names'][$id]), drupal_render($form['weights'][$id])),
-        'class' => 'draggable',
+        'class' => array('draggable'),
       );
     }
   }
Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.264
diff -u -p -r1.264 filter.module
--- modules/filter/filter.module	27 Jul 2009 20:15:35 -0000	1.264
+++ modules/filter/filter.module	31 Jul 2009 15:13:02 -0000
@@ -227,15 +227,15 @@ function filter_filter_tips($delta, $for
               if (array_key_exists($tag, $tips)) {
                 if ($tips[$tag]) {
                   $rows[] = array(
-                    array('data' => $tips[$tag][0], 'class' => 'description'),
-                    array('data' => '<code>' . check_plain($tips[$tag][1]) . '</code>', 'class' => 'type'),
-                    array('data' => $tips[$tag][1], 'class' => 'get')
+                    array('data' => $tips[$tag][0], 'class' => array('description')),
+                    array('data' => '<code>' . check_plain($tips[$tag][1]) . '</code>', 'class' => array('type')),
+                    array('data' => $tips[$tag][1], 'class' => array('get'))
                   );
                 }
               }
               else {
                 $rows[] = array(
-                  array('data' => t('No help provided for tag %tag.', array('%tag' => $tag)), 'class' => 'description', 'colspan' => 3),
+                  array('data' => t('No help provided for tag %tag.', array('%tag' => $tag)), 'class' => array('description'), 'colspan' => 3),
                 );
               }
             }
@@ -254,9 +254,9 @@ function filter_filter_tips($delta, $for
             unset($rows);
             foreach ($entities as $entity) {
               $rows[] = array(
-                array('data' => $entity[0], 'class' => 'description'),
-                array('data' => '<code>' . check_plain($entity[1]) . '</code>', 'class' => 'type'),
-                array('data' => $entity[1], 'class' => 'get')
+                array('data' => $entity[0], 'class' => array('description')),
+                array('data' => '<code>' . check_plain($entity[1]) . '</code>', 'class' => array('type')),
+                array('data' => $entity[1], 'class' => array('get'))
               );
             }
             $output .= theme('table', $header, $rows);
@@ -492,7 +492,7 @@ function filter_form($value = FILTER_FOR
   $form = array(
     '#type' => 'fieldset',
     '#weight' => $weight,
-    '#attributes' => array('class' => 'filter-wrapper'),
+    '#attributes' => array('class' => array('filter-wrapper')),
   );
   $form['format_guidelines'] = array(
     '#prefix' => '<div id="' . $element_id . '-guidelines" class="filter-guidelines">',
@@ -513,7 +513,7 @@ function filter_form($value = FILTER_FOR
     '#parents' => $parents,
     '#access' => count($formats) > 1,
     '#id' => $element_id,
-    '#attributes' => array('class' => 'filter-list'),
+    '#attributes' => array('class' => array('filter-list')),
   );
   $form['format_help'] = array(
     '#prefix' => '<div id="' . $element_id . '-help" class="filter-help">',
Index: modules/image/image.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/image/image.admin.inc,v
retrieving revision 1.1
diff -u -p -r1.1 image.admin.inc
--- modules/image/image.admin.inc	21 Jul 2009 07:09:46 -0000	1.1
+++ modules/image/image.admin.inc	31 Jul 2009 15:13:02 -0000
@@ -578,7 +578,7 @@ function theme_image_style_list($styles)
     $row[] = l($style['name'], 'admin/settings/image-styles/edit/' . $style['name']);
     $link_attributes = array(
       'attributes' => array(
-        'class' => 'image-style-link',
+        'class' => array('image-style-link'),
       ),
     );
     $row[] = l(t('edit'), 'admin/settings/image-styles/edit/' . $style['name'], $link_attributes);
@@ -608,7 +608,7 @@ function theme_image_style_effects($form
 
   foreach (element_children($form) as $key) {
     if (is_numeric($key)) {
-      $form[$key]['weight']['#attributes']['class'] = 'image-effect-order-weight';
+      $form[$key]['weight']['#attributes']['class'] = array('image-effect-order-weight');
       $summary = drupal_render($form[$key]['summary']);
       $row = array();
       $row[] = drupal_render($form[$key]['label']) . (empty($summary) ? '' : ' ' . $summary);
@@ -618,7 +618,7 @@ function theme_image_style_effects($form
     }
     else {
       // Add the row for adding a new image effect.
-      $form['new']['weight']['#attributes']['class'] = 'image-effect-order-weight';
+      $form['new']['weight']['#attributes']['class'] = array('image-effect-order-weight');
       $row = array();
       $row[] = '<div class="image-style-new">' . drupal_render($form['new']['new']) . drupal_render($form['new']['add']) . '</div>';
       $row[] = drupal_render($form['new']['weight']);
@@ -627,7 +627,7 @@ function theme_image_style_effects($form
 
     $rows[] = array(
       'data' => $row,
-      'class' => 'draggable',
+      'class' => array('draggable'),
     );
   }
 
@@ -742,7 +742,7 @@ function theme_image_anchor($element) {
     }
   }
 
-  return theme('table', array(), $rows, array('class' => 'image-anchor'));
+  return theme('table', array(), $rows, array('class' => array('image-anchor')));
 }
 
 /**
Index: modules/locale/locale.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.api.php,v
retrieving revision 1.3
diff -u -p -r1.3 locale.api.php
--- modules/locale/locale.api.php	11 Jul 2009 13:56:21 -0000	1.3
+++ modules/locale/locale.api.php	31 Jul 2009 15:13:02 -0000
@@ -40,7 +40,7 @@ function hook_translation_link_alter(arr
 
   if (isset($links[$language])) {
     foreach ($links[$language] as $link) {
-      $link['attributes']['class'] .= ' active-language';
+      $link['attributes']['class'][] = 'active-language';
     }
   }
 }
Index: modules/locale/locale.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
retrieving revision 1.245
diff -u -p -r1.245 locale.module
--- modules/locale/locale.module	30 Jul 2009 19:57:10 -0000	1.245
+++ modules/locale/locale.module	31 Jul 2009 15:13:02 -0000
@@ -640,7 +640,7 @@ function locale_block_view($delta = '') 
         'href'       => $path,
         'title'      => $language->native,
         'language'   => $language,
-        'attributes' => array('class' => 'language-link'),
+        'attributes' => array('class' => array('language-link')),
       );
     }
 
Index: modules/menu/menu.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.admin.inc,v
retrieving revision 1.53
diff -u -p -r1.53 menu.admin.inc
--- modules/menu/menu.admin.inc	20 Jul 2009 18:51:33 -0000	1.53
+++ modules/menu/menu.admin.inc	31 Jul 2009 15:13:02 -0000
@@ -82,7 +82,7 @@ function _menu_overview_tree_form($tree)
     if ($item && $item['hidden'] >= 0) {
       $mlid = 'mlid:' . $item['mlid'];
       $form[$mlid]['#item'] = $item;
-      $form[$mlid]['#attributes'] = $item['hidden'] ? array('class' => 'menu-disabled') : array('class' => 'menu-enabled');
+      $form[$mlid]['#attributes'] = $item['hidden'] ? array('class' => array('menu-disabled')) : array('class' => array('menu-enabled'));
       $form[$mlid]['title']['#markup'] = l($item['title'], $item['href'], $item['localized_options']) . ($item['hidden'] ? ' (' . t('disabled') . ')' : '');
       $form[$mlid]['hidden'] = array(
         '#type' => 'checkbox',
@@ -188,8 +188,8 @@ function theme_menu_overview_form($form)
 
   $header = array(
     t('Menu link'),
-    array('data' => t('Enabled'), 'class' => 'checkbox'),
-    array('data' => t('Show as expanded'), 'class' => 'checkbox'),
+    array('data' => t('Enabled'), 'class' => array('checkbox')),
+    array('data' => t('Show as expanded'), 'class' => array('checkbox')),
     t('Weight'),
     array('data' => t('Operations'), 'colspan' => '3'),
   );
@@ -208,22 +208,22 @@ function theme_menu_overview_form($form)
       }
 
       // Add special classes to be used for tabledrag.js.
-      $element['plid']['#attributes']['class'] = 'menu-plid';
-      $element['mlid']['#attributes']['class'] = 'menu-mlid';
-      $element['weight']['#attributes']['class'] = 'menu-weight';
+      $element['plid']['#attributes']['class'] = array('menu-plid');
+      $element['mlid']['#attributes']['class'] = array('menu-mlid');
+      $element['weight']['#attributes']['class'] = array('menu-weight');
 
       // Change the parent field to a hidden. This allows any value but hides the field.
       $element['plid']['#type'] = 'hidden';
 
       $row = array();
       $row[] = theme('indentation', $element['#item']['depth'] - 1) . drupal_render($element['title']);
-      $row[] = array('data' => drupal_render($element['hidden']), 'class' => 'checkbox');
-      $row[] = array('data' => drupal_render($element['expanded']), 'class' => 'checkbox');
+      $row[] = array('data' => drupal_render($element['hidden']), 'class' => array('checkbox'));
+      $row[] = array('data' => drupal_render($element['expanded']), 'class' => array('checkbox'));
       $row[] = drupal_render($element['weight']) . drupal_render($element['plid']) . drupal_render($element['mlid']);
       $row = array_merge($row, $operations);
 
       $row = array_merge(array('data' => $row), $element['#attributes']);
-      $row['class'] = !empty($row['class']) ? $row['class'] . ' draggable' : 'draggable';
+      $row['class'][] = 'draggable';
       $rows[] = $row;
     }
   }
@@ -247,7 +247,7 @@ function menu_edit_item(&$form_state, $t
     '#collapsible' => FALSE,
     '#tree' => TRUE,
     '#weight' => -2,
-    '#attributes' => array('class' => 'menu-item-form'),
+    '#attributes' => array('class' => array('menu-item-form')),
     '#item' => $item,
   );
   if ($type == 'add' || empty($item)) {
@@ -329,7 +329,7 @@ function menu_edit_item(&$form_state, $t
     '#default_value' => $default,
     '#options' => $options,
     '#description' => t('The maximum depth for a link and all its children is fixed at !maxdepth. Some menu links may not be available as parents if selecting them would exceed this limit.', array('!maxdepth' => MENU_MAX_DEPTH)),
-    '#attributes' => array('class' => 'menu-title-select'),
+    '#attributes' => array('class' => array('menu-title-select')),
   );
   $form['menu']['weight'] = array(
     '#type' => 'weight',
Index: modules/menu/menu.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.module,v
retrieving revision 1.195
diff -u -p -r1.195 menu.module
--- modules/menu/menu.module	20 Jul 2009 18:51:33 -0000	1.195
+++ modules/menu/menu.module	31 Jul 2009 15:13:02 -0000
@@ -405,7 +405,7 @@ function menu_form_alter(&$form, $form_s
       '#attached_js' => array(drupal_get_path('module', 'menu') . '/menu.js'),
       '#tree' => TRUE,
       '#weight' => -2,
-      '#attributes' => array('class' => 'menu-item-form'),
+      '#attributes' => array('class' => array('menu-item-form')),
     );
     $item = $form['#node']->menu;
 
@@ -443,7 +443,7 @@ function menu_form_alter(&$form, $form_s
       '#default_value' => $default,
       '#options' => $options,
       '#description' => t('The maximum depth for an item and all its children is fixed at !maxdepth. Some menu items may not be available as parents if selecting them would exceed this limit.', array('!maxdepth' => MENU_MAX_DEPTH)),
-      '#attributes' => array('class' => 'menu-title-select'),
+      '#attributes' => array('class' => array('menu-title-select')),
     );
     $form['#submit'][] = 'menu_node_form_submit';
 
Index: modules/node/content_types.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v
retrieving revision 1.84
diff -u -p -r1.84 content_types.inc
--- modules/node/content_types.inc	29 Jul 2009 06:39:34 -0000	1.84
+++ modules/node/content_types.inc	31 Jul 2009 15:13:02 -0000
@@ -35,7 +35,7 @@ function node_overview_types() {
   }
 
   if (empty($rows)) {
-    $rows[] = array(array('data' => t('No content types available. <a href="@link">Add content type</a>.', array('@link' => url('admin/structure/types/add'))), 'colspan' => '5', 'class' => 'message'));
+    $rows[] = array(array('data' => t('No content types available. <a href="@link">Add content type</a>.', array('@link' => url('admin/structure/types/add'))), 'colspan' => '5', 'class' => array('message')));
   }
   
   $build['node_table'] = array(
Index: modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.60
diff -u -p -r1.60 node.admin.inc
--- modules/node/node.admin.inc	30 Jul 2009 19:24:21 -0000	1.60
+++ modules/node/node.admin.inc	31 Jul 2009 15:13:02 -0000
@@ -376,7 +376,7 @@ function node_admin_content($form_state)
   if (_node_add_access()) {
     $form['add_content'] = array(
       '#type' => 'markup',
-      '#markup' => l(t('Add new content'), 'node/add', array('attributes' => array('class' => 'node-admin-add-content'))),
+      '#markup' => l(t('Add new content'), 'node/add', array('attributes' => array('class' => array('node-admin-add-content')))),
     );
   }
   $form[] = node_filter_form();
@@ -599,4 +599,4 @@ function node_multiple_delete_confirm_su
 function node_modules_installed($modules) {
   // Clear node type cache for node permissions.
   node_type_clear();
-}
\ No newline at end of file
+}
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1089
diff -u -p -r1.1089 node.module
--- modules/node/node.module	30 Jul 2009 19:24:21 -0000	1.1089
+++ modules/node/node.module	31 Jul 2009 15:13:02 -0000
@@ -1154,7 +1154,7 @@ function node_build_content($node, $buil
   $node->content['links']['node'] = array(
     '#theme' => 'links',
     '#links' => $links,
-    '#attributes' => array('class' => 'links inline'),
+    '#attributes' => array('class' => array('links', 'inline')),
   );
 
   // Allow modules to make their own additions to the node.
@@ -2079,7 +2079,7 @@ function node_form_search_form_alter(&$f
       '#title' => t('Advanced search'),
       '#collapsible' => TRUE,
       '#collapsed' => TRUE,
-      '#attributes' => array('class' => 'search-advanced'),
+      '#attributes' => array('class' => array('search-advanced')),
     );
     $form['advanced']['keywords'] = array(
       '#prefix' => '<div class="criterion">',
Index: modules/node/node.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.72
diff -u -p -r1.72 node.pages.inc
--- modules/node/node.pages.inc	29 Jul 2009 06:39:34 -0000	1.72
+++ modules/node/node.pages.inc	31 Jul 2009 15:13:02 -0000
@@ -497,8 +497,8 @@ function node_revision_overview($node) {
     if ($revision->current_vid > 0) {
       $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid"), '!username' => theme('username', $revision)))
                                . (($revision->log != '') ? '<p class="revision-log">' . filter_xss($revision->log) . '</p>' : ''),
-                     'class' => 'revision-current');
-      $operations[] = array('data' => theme('placeholder', t('current revision')), 'class' => 'revision-current', 'colspan' => 2);
+                     'class' => array('revision-current'));
+      $operations[] = array('data' => theme('placeholder', t('current revision')), 'class' => array('revision-current'), 'colspan' => 2);
     }
     else {
       $row[] = t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => theme('username', $revision)))
Index: modules/openid/openid.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.module,v
retrieving revision 1.51
diff -u -p -r1.51 openid.module
--- modules/openid/openid.module	30 Jun 2009 11:32:08 -0000	1.51
+++ modules/openid/openid.module	31 Jul 2009 15:13:02 -0000
@@ -96,11 +96,11 @@ function _openid_user_login_form_alter(&
   $items = array();
   $items[] = array(
     'data' => l(t('Log in using OpenID'), '#'),
-    'class' => 'openid-link',
+    'class' => array('openid-link'),
   );
   $items[] = array(
     'data' => l(t('Cancel OpenID login'), '#'),
-    'class' => 'user-link',
+    'class' => array('user-link'),
   );
 
   $form['openid_links'] = array(
Index: modules/path/path.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.admin.inc,v
retrieving revision 1.27
diff -u -p -r1.27 path.admin.inc
--- modules/path/path.admin.inc	29 Jul 2009 06:39:34 -0000	1.27
+++ modules/path/path.admin.inc	31 Jul 2009 15:13:03 -0000
@@ -42,9 +42,6 @@ function path_admin_overview($keys = NUL
   $destination = drupal_get_destination();
   foreach ($result as $data) {
     $row = array(
-      // If the system path maps to a different URL alias, highlight this table
-      // row to let the user know of old aliases.
-      'class' => ($data->dst != drupal_get_path_alias($data->src, $data->language) ? 'warning' : NULL),
       'data' => array(
         l($data->dst, $data->src),
         l($data->src, $data->src, array('alias' => TRUE)),
@@ -52,6 +49,11 @@ function path_admin_overview($keys = NUL
         l(t('delete'), "admin/settings/path/delete/$data->pid", array('query' => $destination)),
       ),
     );
+    // If the system path maps to a different URL alias, highlight this table
+    // row to let the user know of old aliases.
+    if ($data->dst != drupal_get_path_alias($data->src, $data->language)) {
+      $row['class'] = array('warning');
+    }
     if ($multilanguage) {
       array_splice($row['data'], 2, 0, module_invoke('locale', 'language_name', $data->language));
     }
@@ -208,7 +210,7 @@ function path_admin_delete_confirm_submi
  * @see path_admin_filter_form_submit()
  */
 function path_admin_filter_form(&$form_state, $keys = '') {
-  $form['#attributes'] = array('class' => 'search-form');
+  $form['#attributes'] = array('class' => array('search-form'));
   $form['basic'] = array('#type' => 'fieldset',
     '#title' => t('Filter aliases')
   );
Index: modules/poll/poll.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v
retrieving revision 1.301
diff -u -p -r1.301 poll.module
--- modules/poll/poll.module	5 Jul 2009 18:00:09 -0000	1.301
+++ modules/poll/poll.module	31 Jul 2009 15:13:03 -0000
@@ -755,21 +755,23 @@ function theme_poll_choices($form) {
   foreach (element_children($form) as $key) {
     $delta++;
     // Set special classes for drag and drop updating.
-    $form[$key]['weight']['#attributes']['class'] = 'poll-weight';
+    $form[$key]['weight']['#attributes']['class'] = array('poll-weight');
 
     // Build the table row.
     $row = array(
       'data' => array(
-        array('class' => 'choice-flag'),
+        array('class' => array('choice-flag')),
         drupal_render($form[$key]['chtext']),
         drupal_render($form[$key]['chvotes']),
         drupal_render($form[$key]['weight']),
       ),
-      'class' => 'draggable',
+      'class' => array('draggable'),
     );
 
     // Add any additional classes set on the row.
-    $row['class'] .= isset($form[$key]['#attributes']['class']) ? ' ' . $form[$key]['#attributes']['class'] : '';
+    if (!empty($form[$key]['#attributes']['class'])) {
+      $row['class'] = array_merge($row['class'], $form[$key]['#attributes']['class']);
+    }
 
     $rows[] = $row;
   }
Index: modules/profile/profile.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.admin.inc,v
retrieving revision 1.25
diff -u -p -r1.25 profile.admin.inc
--- modules/profile/profile.admin.inc	26 May 2009 10:41:06 -0000	1.25
+++ modules/profile/profile.admin.inc	31 Jul 2009 15:13:03 -0000
@@ -116,9 +116,9 @@ function theme_profile_admin_overview($f
         // Category classes are given numeric IDs because there's no guarantee
         // class names won't contain invalid characters.
         $categories[$category] = $category_number;
-        $category_field['#attributes']['class'] = 'profile-category profile-category-' . $category_number;
-        $rows[] = array(array('data' => $category, 'colspan' => 7, 'class' => 'category'));
-        $rows[] = array('data' => array(array('data' => '<em>' . t('No fields in this category. If this category remains empty when saved, it will be removed.') . '</em>', 'colspan' => 7)), 'class' => 'category-' . $category_number . '-message category-message category-populated');
+        $category_field['#attributes']['class'] = array('profile-category', 'profile-category-' . $category_number);
+        $rows[] = array(array('data' => $category, 'colspan' => 7, 'class' => array('category')));
+        $rows[] = array('data' => array(array('data' => '<em>' . t('No fields in this category. If this category remains empty when saved, it will be removed.') . '</em>', 'colspan' => 7)), 'class' => array('category-' . $category_number . '-message', 'category-message', 'category-populated'));
 
         // Make it draggable only if there is more than one field
         if (isset($form['submit'])) {
@@ -129,8 +129,8 @@ function theme_profile_admin_overview($f
       }
 
       // Add special drag and drop classes that group fields together.
-      $field['weight']['#attributes']['class'] = 'profile-weight profile-weight-' . $categories[$category];
-      $field['category']['#attributes']['class'] = 'profile-category profile-category-' . $categories[$category];
+      $field['weight']['#attributes']['class'] = array('profile-weight', 'profile-weight-' . $categories[$category]);
+      $field['category']['#attributes']['class'] = array('profile-category', 'profile-category-' . $categories[$category]);
 
       // Add the row
       $row = array();
@@ -143,7 +143,7 @@ function theme_profile_admin_overview($f
       }
       $row[] = drupal_render($field['edit']);
       $row[] = drupal_render($field['delete']);
-      $rows[] = array('data' => $row, 'class' => 'draggable');
+      $rows[] = array('data' => $row, 'class' => array('draggable'));
     }
   }
   if (empty($rows)) {
Index: modules/profile/profile.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v
retrieving revision 1.262
diff -u -p -r1.262 profile.module
--- modules/profile/profile.module	28 Jul 2009 19:18:06 -0000	1.262
+++ modules/profile/profile.module	31 Jul 2009 15:13:03 -0000
@@ -365,7 +365,7 @@ function profile_view_profile(&$user) {
         '#title' => $title,
         '#markup' => $value,
         '#weight' => $field->weight,
-        '#attributes' => array('class' => 'profile-' . $field->name),
+        '#attributes' => array('class' => array('profile-' . $field->name)),
       );
     }
   }
Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.303
diff -u -p -r1.303 search.module
--- modules/search/search.module	23 Jul 2009 20:58:26 -0000	1.303
+++ modules/search/search.module	31 Jul 2009 15:13:03 -0000
@@ -1070,7 +1070,7 @@ function search_form(&$form_state, $acti
 
   $form = array(
     '#action' => $action,
-    '#attributes' => array('class' => 'search-form'),
+    '#attributes' => array('class' => array('search-form')),
   );
   $form['module'] = array('#type' => 'value', '#value' => $type);
   $form['basic'] = array('#type' => 'item', '#title' => $prompt, '#id' => 'edit-keys');
Index: modules/simpletest/simpletest.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.pages.inc,v
retrieving revision 1.10
diff -u -p -r1.10 simpletest.pages.inc
--- modules/simpletest/simpletest.pages.inc	29 Jul 2009 06:39:34 -0000	1.10
+++ modules/simpletest/simpletest.pages.inc	31 Jul 2009 15:13:03 -0000
@@ -72,8 +72,8 @@ function theme_simpletest_test_table($ta
   // Create header for test selection table.
   $header = array(
     theme('table_select_header_cell'),
-    array('data' => t('Test'), 'class' => 'simpletest_test'),
-    array('data' => t('Description'), 'class' => 'simpletest_description'),
+    array('data' => t('Test'), 'class' => array('simpletest_test')),
+    array('data' => t('Description'), 'class' => array('simpletest_description')),
   );
 
   // Define the images used to expand/collapse the test groups.
@@ -100,7 +100,7 @@ function theme_simpletest_test_table($ta
     $image_index = $collapsed ? 0 : 1;
 
     // Place-holder for checkboxes to select group of tests.
-    $row[] = array('id' => $test_class, 'class' => 'simpletest-select-all');
+    $row[] = array('id' => $test_class, 'class' => array('simpletest-select-all'));
 
     // Expand/collapse image and group title.
     $row[] = array(
@@ -111,7 +111,7 @@ function theme_simpletest_test_table($ta
 
     $row[] = '&nbsp;';
 
-    $rows[] = array('data' => $row, 'class' => 'simpletest-group');
+    $rows[] = array('data' => $row, 'class' => array('simpletest-group'));
 
     // Add individual tests to group.
     $current_js = array(
@@ -145,7 +145,7 @@ function theme_simpletest_test_table($ta
       $row[] = theme('indentation', 1) . '<label for="edit-' . $test_name . '">' . $title . '</label>';
       $row[] = '<div class="description">' . $description . '</div>';
 
-      $rows[] = array('data' => $row, 'class' => $test_class . '-test' . ($collapsed ? ' js-hide' : ''));
+      $rows[] = array('data' => $row, 'class' => ($collapsed ? array($test_class . '-test', 'js-hide') : array($test_class . '-test')));
     }
     $js['simpletest-test-group-' . $test_class] = $current_js;
     unset($table[$key]);
@@ -254,7 +254,7 @@ function simpletest_result_form(&$form_s
       $row[] = $assertion->function;
       $row[] = simpletest_result_status_image($assertion->status);
 
-      $rows[] = array('data' => $row, 'class' => 'simpletest-' . $assertion->status);
+      $rows[] = array('data' => $row, 'class' => array('simpletest-' . $assertion->status));
 
       $group_summary['#' . $assertion->status]++;
       $form['result']['summary']['#' . $assertion->status]++;
@@ -281,7 +281,7 @@ function simpletest_result_form(&$form_s
   $form['action'] = array(
     '#type' => 'fieldset',
     '#title' => t('Actions'),
-    '#attributes' => array('class' => 'container-inline'),
+    '#attributes' => array('class' => array('container-inline')),
     '#weight' => -11,
   );
 
Index: modules/statistics/statistics.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.admin.inc,v
retrieving revision 1.26
diff -u -p -r1.26 statistics.admin.inc
--- modules/statistics/statistics.admin.inc	29 Jul 2009 06:39:34 -0000	1.26
+++ modules/statistics/statistics.admin.inc	31 Jul 2009 15:13:03 -0000
@@ -29,7 +29,7 @@ function statistics_recent_hits() {
   $rows = array();
   foreach ($result as $log) {
     $rows[] = array(
-      array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'),
+      array('data' => format_date($log->timestamp, 'small'), 'class' => array('nowrap')),
       _statistics_format_item($log->title, $log->path),
       theme('username', $log),
       l(t('details'), "admin/reports/access/$log->aid"));
Index: modules/statistics/statistics.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v
retrieving revision 1.309
diff -u -p -r1.309 statistics.module
--- modules/statistics/statistics.module	28 Jul 2009 19:18:08 -0000	1.309
+++ modules/statistics/statistics.module	31 Jul 2009 15:13:03 -0000
@@ -116,7 +116,7 @@ function statistics_node_view($node, $bu
     $node->content['links']['statistics'] = array(
       '#theme' => 'links',
       '#links' => $links,
-      '#attributes' => array('class' => 'links inline'),
+      '#attributes' => array('class' => array('links', 'inline')),
     );
   }
 }
Index: modules/statistics/statistics.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.pages.inc,v
retrieving revision 1.14
diff -u -p -r1.14 statistics.pages.inc
--- modules/statistics/statistics.pages.inc	29 Jul 2009 06:39:34 -0000	1.14
+++ modules/statistics/statistics.pages.inc	31 Jul 2009 15:13:03 -0000
@@ -31,7 +31,7 @@ function statistics_node_tracker() {
     $rows = array();
     foreach ($result as $log) {
       $rows[] = array(
-        array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'),
+        array('data' => format_date($log->timestamp, 'small'), 'class' => array('nowrap')),
         _statistics_link($log->url),
         theme('username', $log),
         l(t('details'), "admin/reports/access/$log->aid"),
@@ -74,7 +74,7 @@ function statistics_user_tracker() {
     $rows = array();
     foreach ($result as $log) {
       $rows[] = array(
-        array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'),
+        array('data' => format_date($log->timestamp, 'small'), 'class' => array('nowrap')),
         _statistics_format_item($log->title, $log->path),
         l(t('details'), "admin/reports/access/$log->aid"));
     }
Index: modules/system/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/page.tpl.php,v
retrieving revision 1.26
diff -u -p -r1.26 page.tpl.php
--- modules/system/page.tpl.php	30 Jul 2009 08:28:47 -0000	1.26
+++ modules/system/page.tpl.php	31 Jul 2009 15:13:03 -0000
@@ -154,7 +154,7 @@
 
     <?php if ($main_menu): ?>
       <div id="navigation"><div class="section">
-        <?php print theme('links', $main_menu, array('id' => 'main-menu', 'class' => 'links clearfix')); ?>
+        <?php print theme('links', $main_menu, array('id' => 'main-menu', 'class' => array('links', 'clearfix'))); ?>
       </div></div> <!-- /.section, /#navigation -->
     <?php endif; ?>
 
@@ -192,7 +192,7 @@
     </div></div> <!-- /#main, /#main-wrapper -->
 
     <div id="footer"><div class="section">
-      <?php print theme('links', $secondary_menu, array('id' => 'secondary-menu', 'class' => 'links clearfix')); ?>
+      <?php print theme('links', $secondary_menu, array('id' => 'secondary-menu', 'class' => array('links', 'clearfix'))); ?>
       <?php if ($footer): ?><div id="footer-region" class="region"><?php print $footer; ?></div><?php endif; ?>
     </div></div> <!-- /.section, /#footer -->
 
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.166
diff -u -p -r1.166 system.admin.inc
--- modules/system/system.admin.inc	31 Jul 2009 11:20:42 -0000	1.166
+++ modules/system/system.admin.inc	31 Jul 2009 15:13:03 -0000
@@ -157,7 +157,7 @@ function system_themes_form() {
       }
       $theme_key = isset($themes[$theme_key]->info['base theme']) ? $themes[$theme_key]->info['base theme'] : NULL;
     }
-    $screenshot = $screenshot ? theme('image', $screenshot, t('Screenshot for %theme theme', array('%theme' => $theme->info['name'])), '', array('class' => 'screenshot'), FALSE) : t('no screenshot');
+    $screenshot = $screenshot ? theme('image', $screenshot, t('Screenshot for %theme theme', array('%theme' => $theme->info['name'])), '', array('class' => array('screenshot')), FALSE) : t('no screenshot');
 
     $form[$theme->name]['screenshot'] = array('#markup' => $screenshot);
     $form[$theme->name]['info'] = array(
@@ -412,7 +412,7 @@ function system_theme_settings(&$form_st
       '#type' => 'fieldset',
       '#title' => t('Logo image settings'),
       '#description' => t('If toggled on, the following logo will be displayed.'),
-      '#attributes' => array('class' => 'theme-settings-bottom'),
+      '#attributes' => array('class' => array('theme-settings-bottom')),
     );
     $form['logo']['default_logo'] = array(
       '#type' => 'checkbox',
@@ -659,7 +659,7 @@ function system_modules($form_state = ar
       '#collapsible' => TRUE,
       '#theme' => 'system_modules_fieldset',
       '#header' => array(
-        array('data' => t('Enabled'), 'class' => 'checkbox'),
+        array('data' => t('Enabled'), 'class' => array('checkbox')),
         t('Name'),
         t('Version'),
         t('Description'),
@@ -1559,7 +1559,7 @@ function system_regional_settings() {
     '#title' => t('Default country'),
     '#default_value' => variable_get('site_default_country', ''),
     '#options' => $countries,
-    '#attributes' => array('class' => 'country-detect'),
+    '#attributes' => array('class' => array('country-detect')),
   );
 
   $form['locale']['date_first_day'] = array(
@@ -1624,7 +1624,7 @@ function system_regional_settings() {
     '#suffix' => '</div>',
     '#type' => 'select',
     '#title' => t('Short date format'),
-    '#attributes' => array('class' => 'date-format'),
+    '#attributes' => array('class' => array('date-format')),
     '#default_value' => (isset($date_short_choices[$date_format_short]) ? $date_format_short : 'custom'),
     '#options' => $date_short_choices,
   );
@@ -1635,7 +1635,7 @@ function system_regional_settings() {
     '#suffix' => '</div></div>',
     '#type' => 'textfield',
     '#title' => t('Custom short date format'),
-    '#attributes' => array('class' => 'custom-format'),
+    '#attributes' => array('class' => array('custom-format')),
     '#default_value' => $default_short_custom,
     '#description' => t('A user-defined short date format. See the <a href="@url">PHP manual</a> for available options. This format is currently set to display as <span>%date</span>.', array('@url' => 'http://php.net/manual/function.date.php', '%date' => format_date(REQUEST_TIME, 'custom', $default_short_custom))),
   );
@@ -1646,7 +1646,7 @@ function system_regional_settings() {
     '#suffix' => '</div>',
     '#type' => 'select',
     '#title' => t('Medium date format'),
-    '#attributes' => array('class' => 'date-format'),
+    '#attributes' => array('class' => array('date-format')),
     '#default_value' => (isset($date_medium_choices[$date_format_medium]) ? $date_format_medium : 'custom'),
     '#options' => $date_medium_choices,
   );
@@ -1657,7 +1657,7 @@ function system_regional_settings() {
     '#suffix' => '</div></div>',
     '#type' => 'textfield',
     '#title' => t('Custom medium date format'),
-    '#attributes' => array('class' => 'custom-format'),
+    '#attributes' => array('class' => array('custom-format')),
     '#default_value' => $default_medium_custom,
     '#description' => t('A user-defined medium date format. See the <a href="@url">PHP manual</a> for available options. This format is currently set to display as <span>%date</span>.', array('@url' => 'http://php.net/manual/function.date.php', '%date' => format_date(REQUEST_TIME, 'custom', $default_medium_custom))),
   );
@@ -1668,7 +1668,7 @@ function system_regional_settings() {
     '#suffix' => '</div>',
     '#type' => 'select',
     '#title' => t('Long date format'),
-    '#attributes' => array('class' => 'date-format'),
+    '#attributes' => array('class' => array('date-format')),
     '#default_value' => (isset($date_long_choices[$date_format_long]) ? $date_format_long : 'custom'),
     '#options' => $date_long_choices,
   );
@@ -1679,7 +1679,7 @@ function system_regional_settings() {
     '#suffix' => '</div></div>',
     '#type' => 'textfield',
     '#title' => t('Custom long date format'),
-    '#attributes' => array('class' => 'custom-format'),
+    '#attributes' => array('class' => array('custom-format')),
     '#default_value' => $default_long_custom,
     '#description' => t('A user-defined long date format. See the <a href="@url">PHP manual</a> for available options. This format is currently set to display as <span>%date</span>.', array('@url' => 'http://php.net/manual/function.date.php', '%date' => format_date(REQUEST_TIME, 'custom', $default_long_custom))),
   );
@@ -2063,7 +2063,7 @@ function theme_system_modules_fieldset($
     $module = $form[$key];
     $row = array();
     unset($module['enable']['#title']);
-    $row[] = array('class' => 'checkbox', 'data' => drupal_render($module['enable']));
+    $row[] = array('class' => array('checkbox'), 'data' => drupal_render($module['enable']));
     $label = '<label';
     if (isset($module['enable']['#id'])) {
       $label .= ' for="' . $module['enable']['#id'] . '"';
@@ -2084,7 +2084,7 @@ function theme_system_modules_fieldset($
     if ($module['#required_by']) {
       $description .= '<div class="admin-requirements">' . t('Required by: !module-list', array('!module-list' => implode(', ', $module['#required_by']))) . '</div>';
     }
-    $row[] = array('data' => $description, 'class' => 'description');
+    $row[] = array('data' => $description, 'class' => array('description'));
     $rows[] = $row;
   }
 
@@ -2131,13 +2131,13 @@ function theme_system_modules_uninstall(
     $rows[] = array(
       array('data' => drupal_render($form['uninstall'][$module]), 'align' => 'center'),
       '<strong><label for="' . $form['uninstall'][$module]['#id'] . '">' . drupal_render($form['modules'][$module]['name']) . '</label></strong>',
-      array('data' => drupal_render($form['modules'][$module]['description']), 'class' => 'description'),
+      array('data' => drupal_render($form['modules'][$module]['description']), 'class' => array('description')),
     );
   }
 
   // Only display table if there are modules that can be uninstalled.
   if (empty($rows)) {
-    $rows[] = array(array('data' => t('No modules are available to uninstall.'), 'colspan' => '3', 'align' => 'center', 'class' => 'message'));
+    $rows[] = array(array('data' => t('No modules are available to uninstall.'), 'colspan' => '3', 'align' => 'center', 'class' => array('message')));
   }
 
   $output  = theme('table', $header, $rows);
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.732
diff -u -p -r1.732 system.module
--- modules/system/system.module	31 Jul 2009 11:20:42 -0000	1.732
+++ modules/system/system.module	31 Jul 2009 15:13:04 -0000
@@ -1436,7 +1436,7 @@ function system_user_timezone(&$edit, &$
   );
   if (!$edit['timezone'] && $edit['uid'] == $user->uid) {
     $form['timezone']['#description'] = t('Your time zone setting will be automatically detected if possible. Please confirm the selection and click save.');
-    $form['timezone']['timezone']['#attributes'] = array('class' => 'timezone-detect');
+    $form['timezone']['timezone']['#attributes'] = array('class' => array('timezone-detect'));
     drupal_add_js('misc/timezone.js');
   }
 }
@@ -1492,7 +1492,7 @@ function system_block_configure($delta =
     $form['wrapper']['preview'] = array(
       '#type' => 'item',
       '#title' => 'Preview',
-      '#markup' => theme('image', $image_path, t('Powered by Drupal, an open source content management system'), t('Powered by Drupal, an open source content management system'), array('class' => 'powered-by-preview'), FALSE),
+      '#markup' => theme('image', $image_path, t('Powered by Drupal, an open source content management system'), t('Powered by Drupal, an open source content management system'), array('class' => array('powered-by-preview')), FALSE),
     );
     return $form;
   }
@@ -1632,7 +1632,7 @@ function system_theme_select_form($descr
           $theme_key = isset($themes[$theme_key]->info['base theme']) ? $themes[$theme_key]->info['base theme'] : NULL;
         }
 
-        $screenshot = $screenshot ? theme('image', $screenshot, t('Screenshot for %theme theme', array('%theme' => $info->name)), '', array('class' => 'screenshot'), FALSE) : t('no screenshot');
+        $screenshot = $screenshot ? theme('image', $screenshot, t('Screenshot for %theme theme', array('%theme' => $info->name)), '', array('class' => array('screenshot')), FALSE) : t('no screenshot');
 
         $form['themes'][$info->key]['screenshot'] = array('#markup' => $screenshot);
         $form['themes'][$info->key]['description'] = array('#type' => 'item', '#title' => $info->name, '#markup' => dirname($info->filename) . ($info->name == variable_get('theme_default', 'garland') ? '<br /> <em>' . t('(site default theme)') . '</em>' : ''));
@@ -2181,7 +2181,7 @@ function confirm_form($form, $question, 
   // Confirm form fails duplication check, as the form values rarely change -- so skip it.
   $form['#skip_duplicate_check'] = TRUE;
 
-  $form['#attributes'] = array('class' => 'confirmation');
+  $form['#attributes'] = array('class' => array('confirmation'));
   $form['description'] = array('#markup' => $description);
   $form[$name] = array('#type' => 'hidden', '#value' => 1);
 
Index: modules/taxonomy/taxonomy.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v
retrieving revision 1.63
diff -u -p -r1.63 taxonomy.admin.inc
--- modules/taxonomy/taxonomy.admin.inc	20 Jul 2009 18:51:34 -0000	1.63
+++ modules/taxonomy/taxonomy.admin.inc	31 Jul 2009 15:13:06 -0000
@@ -73,13 +73,13 @@ function theme_taxonomy_overview_vocabul
       $row[] = drupal_render($vocabulary['name']);
       $row[] = drupal_render($vocabulary['types']);
       if (isset($vocabulary['weight'])) {
-        $vocabulary['weight']['#attributes']['class'] = 'vocabulary-weight';
+        $vocabulary['weight']['#attributes']['class'] = array('vocabulary-weight');
         $row[] = drupal_render($vocabulary['weight']);
       }
       $row[] = drupal_render($vocabulary['edit']);
       $row[] = drupal_render($vocabulary['list']);
       $row[] = drupal_render($vocabulary['add']);
-      $rows[] = array('data' => $row, 'class' => 'draggable');
+      $rows[] = array('data' => $row, 'class' => array('draggable'));
     }
   }
 
@@ -607,9 +607,9 @@ function theme_taxonomy_overview_terms($
       $row = array();
       $row[] = (isset($term['#term']['depth']) && $term['#term']['depth'] > 0 ? theme('indentation', $term['#term']['depth']) : '') . drupal_render($term['view']);
       if ($form['#parent_fields']) {
-        $term['tid']['#attributes']['class'] = 'term-id';
-        $term['parent']['#attributes']['class'] = 'term-parent';
-        $term['depth']['#attributes']['class'] = 'term-depth';
+        $term['tid']['#attributes']['class'] = array('term-id');
+        $term['parent']['#attributes']['class'] = array('term-parent');
+        $term['depth']['#attributes']['class'] = array('term-depth');
         $row[0] .= drupal_render($term['parent']) . drupal_render($term['tid']) . drupal_render($term['depth']);
       }
       $row[] = drupal_render($term['edit']);
@@ -622,32 +622,31 @@ function theme_taxonomy_overview_terms($
   // Add necessary classes to rows.
   $row_position = 0;
   foreach ($rows as $key => $row) {
-    $classes = array();
+    $rows[$key]['class'] = array();
     if (isset($form['#parent_fields'])) {
-      $classes[] = 'draggable';
+      $rows[$key]['class'][] = 'draggable';
     }
 
     // Add classes that mark which terms belong to previous and next pages.
     if ($row_position < $back_peddle || $row_position >= $page_entries - $forward_peddle) {
-      $classes[] = 'taxonomy-term-preview';
+      $rows[$key]['class'][] = 'taxonomy-term-preview';
     }
 
     if ($row_position !== 0 && $row_position !== count($rows) - 1) {
       if ($row_position == $back_peddle - 1 || $row_position == $page_entries - $forward_peddle - 1) {
-        $classes[] = 'taxonomy-term-divider-top';
+        $rows[$key]['class'][] = 'taxonomy-term-divider-top';
       }
       elseif ($row_position == $back_peddle || $row_position == $page_entries - $forward_peddle) {
-        $classes[] = 'taxonomy-term-divider-bottom';
+        $rows[$key]['class'][] = 'taxonomy-term-divider-bottom';
       }
     }
 
     // Add an error class if this row contains a form error.
     foreach ($errors as $error_key => $error) {
       if (strpos($error_key, $key) === 0) {
-        $classes[] = 'error';
+        $rows[$key]['class'][] = 'error';
       }
     }
-    $rows[$key]['class'] = implode(' ', $classes);
     $row_position++;
   }
 
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.490
diff -u -p -r1.490 taxonomy.module
--- modules/taxonomy/taxonomy.module	31 Jul 2009 09:58:55 -0000	1.490
+++ modules/taxonomy/taxonomy.module	31 Jul 2009 15:13:06 -0000
@@ -141,7 +141,7 @@ function taxonomy_node_view($node, $buil
     $node->content['links']['terms'] = array(
       '#theme' => 'links',
       '#links' => $links,
-      '#attributes' => array('class' => 'links inline'),
+      '#attributes' => array('class' => array('links', 'inline')),
       '#sorted' => TRUE,
     );
   }
Index: modules/toolbar/toolbar.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.module,v
retrieving revision 1.4
diff -u -p -r1.4 toolbar.module
--- modules/toolbar/toolbar.module	28 Jul 2009 10:35:56 -0000	1.4
+++ modules/toolbar/toolbar.module	31 Jul 2009 15:13:06 -0000
@@ -147,7 +147,7 @@ function toolbar_menu_navigation_links($
       // Add icon placeholder.
       $link['title'] = '<span class="icon"></span>' . $item['link']['title'];
       // Add admin link ID and to-overlay class for the overlay.
-      $link['attributes'] = array('id' => 'toolbar-link-' . $id, 'class' => 'to-overlay');
+      $link['attributes'] = array('id' => 'toolbar-link-' . $id, 'class' => array('to-overlay'));
       $link['html'] = TRUE;
 
       $class = ' path-' . $id;
Index: modules/tracker/tracker.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/tracker/tracker.pages.inc,v
retrieving revision 1.22
diff -u -p -r1.22 tracker.pages.inc
--- modules/tracker/tracker.pages.inc	2 Jul 2009 04:27:23 -0000	1.22
+++ modules/tracker/tracker.pages.inc	31 Jul 2009 15:13:06 -0000
@@ -59,7 +59,7 @@ function tracker_page($account = NULL, $
       check_plain(node_type_get_name($node->type)),
       l($node->title, "node/$node->nid") . ' ' . theme('mark', node_mark($node->nid, $node->changed)),
       theme('username', $node),
-      array('class' => 'replies', 'data' => $comments),
+      array('class' => array('replies'), 'data' => $comments),
       t('!time ago', array('!time' => format_interval(REQUEST_TIME - $node->last_updated)))
     );
   }
Index: modules/translation/translation.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/translation/translation.module,v
retrieving revision 1.53
diff -u -p -r1.53 translation.module
--- modules/translation/translation.module	30 Jul 2009 19:24:21 -0000	1.53
+++ modules/translation/translation.module	31 Jul 2009 15:13:07 -0000
@@ -178,12 +178,12 @@ function translation_node_view($node, $b
           'title' => $language->native,
           'href' => 'node/' . $translations[$langcode]->nid,
           'language' => $language,
-          'attributes' => array('title' => $translations[$langcode]->title, 'class' => 'translation-link')
+          'attributes' => array('title' => $translations[$langcode]->title, 'class' => array('translation-link')),
         );
         $node->content['links']['translation'] = array(
           '#theme' => 'links',
           '#links' => $links,
-          '#attributes' => array('class' => 'links inline'),
+          '#attributes' => array('class' => array('links', 'inline')),
         );
       }
     }
Index: modules/update/update.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.api.php,v
retrieving revision 1.3
diff -u -p -r1.3 update.api.php
--- modules/update/update.api.php	5 Jun 2009 01:04:11 -0000	1.3
+++ modules/update/update.api.php	31 Jul 2009 15:13:07 -0000
@@ -95,7 +95,7 @@ function hook_update_status_alter(&$proj
       $projects[$project]['reason'] = t('Ignored from settings');
       if (!empty($settings[$project]['notes'])) {
         $projects[$project]['extra'][] = array(
-          'class' => 'admin-note',
+          'class' => array('admin-note'),
           'label' => t('Administrator note'),
           'data' => $settings[$project]['notes'],
         );
Index: modules/update/update.compare.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.compare.inc,v
retrieving revision 1.25
diff -u -p -r1.25 update.compare.inc
--- modules/update/update.compare.inc	31 Jul 2009 11:20:43 -0000	1.25
+++ modules/update/update.compare.inc	31 Jul 2009 15:13:07 -0000
@@ -275,7 +275,7 @@ function update_calculate_project_data($
               $projects[$project]['extra'] = array();
             }
             $projects[$project]['extra'][] = array(
-              'class' => 'project-not-secure',
+              'class' => array('project-not-secure'),
               'label' => t('Project not secure'),
               'data' => t('This project has been labeled insecure by the Drupal security team, and is no longer available for download. Immediately disabling everything included by this project is strongly recommended!'),
             );
@@ -287,7 +287,7 @@ function update_calculate_project_data($
               $projects[$project]['extra'] = array();
             }
             $projects[$project]['extra'][] = array(
-              'class' => 'project-revoked',
+              'class' => array('project-revoked'),
               'label' => t('Project revoked'),
               'data' => t('This project has been revoked, and is no longer available for download. Disabling everything included by this project is strongly recommended!'),
             );
@@ -298,7 +298,7 @@ function update_calculate_project_data($
               $projects[$project]['extra'] = array();
             }
             $projects[$project]['extra'][] = array(
-              'class' => 'project-not-supported',
+              'class' => array('project-not-supported'),
               'label' => t('Project not supported'),
               'data' => t('This project is no longer supported, and is no longer available for download. Disabling everything included by this project is strongly recommended!'),
             );
@@ -387,7 +387,7 @@ function update_calculate_project_data($
               $projects[$project]['extra'] = array();
             }
             $projects[$project]['extra'][] = array(
-              'class' => 'release-revoked',
+              'class' => array('release-revoked'),
               'label' => t('Release revoked'),
               'data' => t('Your currently installed release has been revoked, and is no longer available for download. Disabling everything included in this release or upgrading is strongly recommended!'),
             );
@@ -399,7 +399,7 @@ function update_calculate_project_data($
               $projects[$project]['extra'] = array();
             }
             $projects[$project]['extra'][] = array(
-              'class' => 'release-not-supported',
+              'class' => array('release-not-supported'),
               'label' => t('Release not supported'),
               'data' => t('Your currently installed release is now unsupported, and is no longer available for download. Disabling everything included in this release or upgrading is strongly recommended!'),
             );
Index: modules/update/update.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.module,v
retrieving revision 1.40
diff -u -p -r1.40 update.module
--- modules/update/update.module	31 Jul 2009 11:20:43 -0000	1.40
+++ modules/update/update.module	31 Jul 2009 15:13:07 -0000
@@ -162,7 +162,7 @@ function update_theme() {
       'arguments' => array('data' => NULL),
     ),
     'update_version' => array(
-      'arguments' => array('version' => NULL, 'tag' => NULL, 'class' => NULL),
+      'arguments' => array('version' => NULL, 'tag' => NULL, 'class' => array()),
     ),
   );
 }
Index: modules/update/update.report.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.report.inc,v
retrieving revision 1.18
diff -u -p -r1.18 update.report.inc
--- modules/update/update.report.inc	6 Jun 2009 06:26:13 -0000	1.18
+++ modules/update/update.report.inc	31 Jul 2009 15:13:07 -0000
@@ -121,8 +121,8 @@ function theme_update_report($data) {
           $security_class = ' version-recommended version-recommended-strong';
         }
         else {
-          $security_class = '';
-          $version_class = 'version-recommended';
+          $security_class = array();
+          $version_class[] = 'version-recommended';
           // Apply an extra class if we're displaying both a recommended
           // version and anything else for an extra visual hint.
           if ($project['recommended'] !== $project['latest_version']
@@ -134,7 +134,7 @@ function theme_update_report($data) {
               || (isset($project['security updates'][0])
                 && $project['recommended'] !== $project['security updates'][0])
               ) {
-            $version_class .= ' version-recommended-strong';
+            $version_class[] = 'version-recommended-strong';
           }
           $row .= theme('update_version', $project['releases'][$project['recommended']], t('Recommended version:'), $version_class);
         }
@@ -148,19 +148,19 @@ function theme_update_report($data) {
       }
 
       if ($project['recommended'] !== $project['latest_version']) {
-        $row .= theme('update_version', $project['releases'][$project['latest_version']], t('Latest version:'), 'version-latest');
+        $row .= theme('update_version', $project['releases'][$project['latest_version']], t('Latest version:'), array('version-latest'));
       }
       if ($project['install_type'] == 'dev'
           && $project['status'] != UPDATE_CURRENT
           && isset($project['dev_version'])
           && $project['recommended'] !== $project['dev_version']) {
-        $row .= theme('update_version', $project['releases'][$project['dev_version']], t('Development version:'), 'version-latest');
+        $row .= theme('update_version', $project['releases'][$project['dev_version']], t('Development version:'), array('version-latest'));
       }
     }
 
     if (isset($project['also'])) {
       foreach ($project['also'] as $also) {
-        $row .= theme('update_version', $project['releases'][$also], t('Also available:'), 'version-also-available');
+        $row .= theme('update_version', $project['releases'][$also], t('Also available:'), array('version-also-available'));
       }
     }
 
@@ -170,7 +170,7 @@ function theme_update_report($data) {
     if (!empty($project['extra'])) {
       $row .= '<div class="extra">' . "\n";
       foreach ($project['extra'] as $key => $value) {
-        $row .= '<div class="' . $value['class'] . '">';
+        $row .= '<div class="' . implode(' ', $value['class']) . '">';
         $row .= check_plain($value['label']) . ': ';
         $row .= theme('placeholder', $value['data']);
         $row .= "</div>\n";
@@ -189,7 +189,7 @@ function theme_update_report($data) {
       $rows[$project['project_type']] = array();
     }
     $rows[$project['project_type']][] = array(
-      'class' => $class,
+      'class' => array($class),
       'data' => array($row),
     );
   }
@@ -204,7 +204,7 @@ function theme_update_report($data) {
   foreach ($project_types as $type_name => $type_label) {
     if (!empty($rows[$type_name])) {
       $output .= "\n<h3>" . $type_label . "</h3>\n";
-      $output .= theme('table', $header, $rows[$type_name], array('class' => 'update'));
+      $output .= theme('table', $header, $rows[$type_name], array('class' => array('update')));
     }
   }
   drupal_add_css(drupal_get_path('module', 'update') . '/update.css');
Index: modules/upload/upload.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.module,v
retrieving revision 1.244
diff -u -p -r1.244 upload.module
--- modules/upload/upload.module	5 Jul 2009 18:00:11 -0000	1.244
+++ modules/upload/upload.module	31 Jul 2009 15:13:07 -0000
@@ -78,7 +78,7 @@ function upload_node_links($node, $build
     $node->content['links']['upload_attachments'] = array(
       '#theme' => 'links',
       '#links' => $links,
-      '#attributes' => array('class' => 'links inline'),
+      '#attributes' => array('class' => array('links', 'inline')),
     );
   }
 }
@@ -449,7 +449,7 @@ function theme_upload_attachments($eleme
     }
   }
   if (count($rows)) {
-    return theme('table', $header, $rows, array('class' => 'attachments'));
+    return theme('table', $header, $rows, array('class' => array('attachments')));
   }
 }
 
@@ -605,7 +605,7 @@ function theme_upload_form_current($form
 
   foreach (element_children($form) as $key) {
     // Add class to group weight fields for drag and drop.
-    $form[$key]['weight']['#attributes']['class'] = 'upload-weight';
+    $form[$key]['weight']['#attributes']['class'] = array('upload-weight');
 
     $row = array('');
     $row[] = drupal_render($form[$key]['remove']);
@@ -613,7 +613,7 @@ function theme_upload_form_current($form
     $row[] = drupal_render($form[$key]['description']);
     $row[] = drupal_render($form[$key]['weight']);
     $row[] = drupal_render($form[$key]['size']);
-    $rows[] = array('data' => $row, 'class' => 'draggable');
+    $rows[] = array('data' => $row, 'class' => array('draggable'));
   }
   $output = theme('table', $header, $rows, array('id' => 'upload-attachments'));
   $output .= drupal_render_children($form);
Index: modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.65
diff -u -p -r1.65 user.admin.inc
--- modules/user/user.admin.inc	21 Jul 2009 07:09:47 -0000	1.65
+++ modules/user/user.admin.inc	31 Jul 2009 15:13:07 -0000
@@ -692,23 +692,23 @@ function theme_user_admin_permissions($f
     $row = array();
     // Module name
     if (is_numeric($key)) {
-      $row[] = array('data' => drupal_render($form['permission'][$key]), 'class' => 'module', 'id' => 'module-' . $form['permission'][$key]['#id'], 'colspan' => count($form['role_names']['#value']) + 1);
+      $row[] = array('data' => drupal_render($form['permission'][$key]), 'class' => array('module'), 'id' => 'module-' . $form['permission'][$key]['#id'], 'colspan' => count($form['role_names']['#value']) + 1);
     }
     else {
       // Permission row.
       $row[] = array(
         'data' => drupal_render($form['permission'][$key]),
-        'class' => 'permission',
+        'class' => array('permission'),
       );
       foreach (element_children($form['checkboxes']) as $rid) {
-        $row[] = array('data' => drupal_render($form['checkboxes'][$rid][$key]), 'class' => 'checkbox', 'title' => $roles[$rid] . ' : ' . t($key));
+        $row[] = array('data' => drupal_render($form['checkboxes'][$rid][$key]), 'class' => array('checkbox'), 'title' => $roles[$rid] . ' : ' . t($key));
       }
     }
     $rows[] = $row;
   }
   $header[] = (t('Permission'));
   foreach (element_children($form['role_names']) as $rid) {
-    $header[] = array('data' => drupal_render($form['role_names'][$rid]), 'class' => 'checkbox');
+    $header[] = array('data' => drupal_render($form['role_names'][$rid]), 'class' => array('checkbox'));
   }
   $output = theme('system_compact_link');
   $output .= theme('table', $header, $rows, array('id' => 'permissions'));
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.1014
diff -u -p -r1.1014 user.module
--- modules/user/user.module	28 Jul 2009 19:32:33 -0000	1.1014
+++ modules/user/user.module	31 Jul 2009 15:13:07 -0000
@@ -888,7 +888,7 @@ function user_user_view(&$edit, &$accoun
   }
   $account->content['summary'] += array(
     '#type' => 'user_profile_category',
-    '#attributes' => array('class' => 'user-member'),
+    '#attributes' => array('class' => array('user-member')),
     '#weight' => 5,
     '#title' => t('History'),
   );
@@ -1782,7 +1782,7 @@ function user_edit_form(&$form_state, $u
       '#maxlength' => USERNAME_MAX_LENGTH,
       '#description' => t('Spaces are allowed; punctuation is not allowed except for periods, hyphens, apostrophes, and underscores.'),
       '#required' => TRUE,
-      '#attributes' => array('class' => 'username'),
+      '#attributes' => array('class' => array('username')),
     );
   }
   $form['account']['mail'] = array('#type' => 'textfield',
Index: themes/garland/template.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/template.php,v
retrieving revision 1.23
diff -u -p -r1.23 template.php
--- themes/garland/template.php	28 Jul 2009 10:09:25 -0000	1.23
+++ themes/garland/template.php	31 Jul 2009 15:13:07 -0000
@@ -19,8 +19,8 @@ function garland_breadcrumb($breadcrumb)
  */
 function garland_preprocess_page(&$vars) {
   $vars['tabs2'] = menu_secondary_local_tasks();
-  $vars['primary_nav'] = isset($vars['main_menu']) ? theme('links', $vars['main_menu'], array('class' => 'links main-menu')) : FALSE;
-  $vars['secondary_nav'] = isset($vars['secondary_menu']) ? theme('links', $vars['secondary_menu'], array('class' => 'links secondary-menu')) : FALSE;
+  $vars['primary_nav'] = isset($vars['main_menu']) ? theme('links', $vars['main_menu'], array('class' => array('links', 'main-menu'))) : FALSE;
+  $vars['secondary_nav'] = isset($vars['secondary_menu']) ? theme('links', $vars['secondary_menu'], array('class' => array('links', 'secondary-menu'))) : FALSE;
   $vars['ie_styles'] = garland_get_ie_styles();
 
   // Prepare header
