Index: modules/system/page.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/page.tpl.php,v
retrieving revision 1.27
diff -u -r1.27 page.tpl.php
--- modules/system/page.tpl.php	3 Aug 2009 03:04:33 -0000	1.27
+++ modules/system/page.tpl.php	20 Aug 2009 03:12:59 -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.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.751
diff -u -r1.751 system.module
--- modules/system/system.module	19 Aug 2009 20:19:37 -0000	1.751
+++ modules/system/system.module	20 Aug 2009 03:12:59 -0000
@@ -1447,7 +1447,7 @@
   );
   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');
   }
 }
@@ -1503,7 +1503,7 @@
     $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;
   }
@@ -2162,7 +2162,7 @@
   // 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/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.180
diff -u -r1.180 system.admin.inc
--- modules/system/system.admin.inc	17 Aug 2009 19:14:41 -0000	1.180
+++ modules/system/system.admin.inc	20 Aug 2009 03:12:59 -0000
@@ -208,7 +208,7 @@
         break;
       }
     }
-    $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(
@@ -464,7 +464,7 @@
       '#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',
@@ -705,7 +705,7 @@
       '#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'),
@@ -1610,7 +1610,7 @@
     '#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(
@@ -1675,7 +1675,7 @@
     '#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,
   );
@@ -1686,7 +1686,7 @@
     '#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))),
   );
@@ -1697,7 +1697,7 @@
     '#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,
   );
@@ -1708,7 +1708,7 @@
     '#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))),
   );
@@ -1719,7 +1719,7 @@
     '#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,
   );
@@ -1730,7 +1730,7 @@
     '#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))),
   );
@@ -2111,7 +2111,7 @@
     $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'] . '"';
@@ -2132,7 +2132,7 @@
     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;
   }
 
@@ -2179,13 +2179,13 @@
     $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/locale/locale.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
retrieving revision 1.250
diff -u -r1.250 locale.module
--- modules/locale/locale.module	17 Aug 2009 20:32:29 -0000	1.250
+++ modules/locale/locale.module	20 Aug 2009 03:12:59 -0000
@@ -641,7 +641,7 @@
         'href'       => $path,
         'title'      => $language->native,
         'language'   => $language,
-        'attributes' => array('class' => 'language-link'),
+        'attributes' => array('class' => array('language-link')),
       );
     }
 
Index: modules/locale/locale.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.api.php,v
retrieving revision 1.3
diff -u -r1.3 locale.api.php
--- modules/locale/locale.api.php	11 Jul 2009 13:56:21 -0000	1.3
+++ modules/locale/locale.api.php	20 Aug 2009 03:12:59 -0000
@@ -40,7 +40,7 @@
 
   if (isset($links[$language])) {
     foreach ($links[$language] as $link) {
-      $link['attributes']['class'] .= ' active-language';
+      $link['attributes']['class'][] = 'active-language';
     }
   }
 }
Index: modules/update/update.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.module,v
retrieving revision 1.41
diff -u -r1.41 update.module
--- modules/update/update.module	12 Aug 2009 23:51:19 -0000	1.41
+++ modules/update/update.module	20 Aug 2009 03:12:59 -0000
@@ -162,7 +162,7 @@
       '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.compare.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.compare.inc,v
retrieving revision 1.27
diff -u -r1.27 update.compare.inc
--- modules/update/update.compare.inc	17 Aug 2009 19:14:41 -0000	1.27
+++ modules/update/update.compare.inc	20 Aug 2009 03:12:59 -0000
@@ -275,7 +275,7 @@
               $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 @@
               $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 @@
               $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 @@
               $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 @@
               $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.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.api.php,v
retrieving revision 1.3
diff -u -r1.3 update.api.php
--- modules/update/update.api.php	5 Jun 2009 01:04:11 -0000	1.3
+++ modules/update/update.api.php	20 Aug 2009 03:12:59 -0000
@@ -95,7 +95,7 @@
       $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.report.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.report.inc,v
retrieving revision 1.18
diff -u -r1.18 update.report.inc
--- modules/update/update.report.inc	6 Jun 2009 06:26:13 -0000	1.18
+++ modules/update/update.report.inc	20 Aug 2009 03:12:59 -0000
@@ -121,8 +121,8 @@
           $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 @@
               || (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 @@
       }
 
       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 @@
     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 @@
       $rows[$project['project_type']] = array();
     }
     $rows[$project['project_type']][] = array(
-      'class' => $class,
+      'class' => array($class),
       'data' => array($row),
     );
   }
@@ -204,7 +204,7 @@
   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/book/book.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.module,v
retrieving revision 1.504
diff -u -r1.504 book.module
--- modules/book/book.module	17 Aug 2009 07:12:15 -0000	1.504
+++ modules/book/book.module	20 Aug 2009 03:12:59 -0000
@@ -91,7 +91,7 @@
     $node->content['links']['book'] = array(
       '#theme' => 'links',
       '#links' => $links,
-      '#attributes' => array('class' => 'links inline'),
+      '#attributes' => array('class' => array('links', 'inline')),
     );
   }
 }
@@ -296,7 +296,7 @@
  * @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 @@
       '#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 @@
     '#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 @@
     '#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')),
     '#ajax' => array(
       'path' => 'book/js/form',
       'wrapper' => 'edit-book-plid-wrapper',
Index: modules/book/book.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.admin.inc,v
retrieving revision 1.20
diff -u -r1.20 book.admin.inc
--- modules/book/book.admin.inc	4 Jun 2009 03:33:27 -0000	1.20
+++ modules/book/book.admin.inc	20 Aug 2009 03:12:59 -0000
@@ -236,9 +236,9 @@
     $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 @@
     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/taxonomy/taxonomy.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v
retrieving revision 1.64
diff -u -r1.64 taxonomy.admin.inc
--- modules/taxonomy/taxonomy.admin.inc	4 Aug 2009 06:50:07 -0000	1.64
+++ modules/taxonomy/taxonomy.admin.inc	20 Aug 2009 03:12:59 -0000
@@ -73,13 +73,13 @@
       $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'));
     }
   }
 
@@ -601,9 +601,9 @@
       $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']);
@@ -616,32 +616,31 @@
   // 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.497
diff -u -r1.497 taxonomy.module
--- modules/taxonomy/taxonomy.module	19 Aug 2009 13:31:13 -0000	1.497
+++ modules/taxonomy/taxonomy.module	20 Aug 2009 03:12:59 -0000
@@ -163,7 +163,7 @@
     $node->content['links']['terms'] = array(
       '#theme' => 'links',
       '#links' => $links,
-      '#attributes' => array('class' => 'links inline'),
+      '#attributes' => array('class' => array('links', 'inline')),
       '#sorted' => TRUE,
     );
   }
@@ -2178,7 +2178,7 @@
     '#default_value' => $typed_string,
     '#autocomplete_path' => 'taxonomy/autocomplete/'. $element['#field_name'] .'/'. $element['#bundle'],
     '#size' => $instance['widget']['settings']['size'],
-    '#attributes' => array('class' => 'text'),
+    '#attributes' => array('class' => array('text')),
     '#title' => $element['#title'],
     '#description' => $element['#description'],
     '#required' => $element['#required'],
Index: modules/statistics/statistics.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.admin.inc,v
retrieving revision 1.26
diff -u -r1.26 statistics.admin.inc
--- modules/statistics/statistics.admin.inc	29 Jul 2009 06:39:34 -0000	1.26
+++ modules/statistics/statistics.admin.inc	20 Aug 2009 03:12:59 -0000
@@ -29,7 +29,7 @@
   $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.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.pages.inc,v
retrieving revision 1.14
diff -u -r1.14 statistics.pages.inc
--- modules/statistics/statistics.pages.inc	29 Jul 2009 06:39:34 -0000	1.14
+++ modules/statistics/statistics.pages.inc	20 Aug 2009 03:12:59 -0000
@@ -31,7 +31,7 @@
     $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 @@
     $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/statistics/statistics.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v
retrieving revision 1.310
diff -u -r1.310 statistics.module
--- modules/statistics/statistics.module	31 Jul 2009 19:01:02 -0000	1.310
+++ modules/statistics/statistics.module	20 Aug 2009 03:12:59 -0000
@@ -116,7 +116,7 @@
     $node->content['links']['statistics'] = array(
       '#theme' => 'links',
       '#links' => $links,
-      '#attributes' => array('class' => 'links inline'),
+      '#attributes' => array('class' => array('links', 'inline')),
     );
   }
 }
Index: modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.68
diff -u -r1.68 user.admin.inc
--- modules/user/user.admin.inc	17 Aug 2009 19:14:41 -0000	1.68
+++ modules/user/user.admin.inc	20 Aug 2009 03:12:59 -0000
@@ -695,23 +695,23 @@
     $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.1023
diff -u -r1.1023 user.module
--- modules/user/user.module	19 Aug 2009 13:31:14 -0000	1.1023
+++ modules/user/user.module	20 Aug 2009 03:12:59 -0000
@@ -920,7 +920,7 @@
   }
   $account->content['summary'] += array(
     '#type' => 'user_profile_category',
-    '#attributes' => array('class' => 'user-member'),
+    '#attributes' => array('class' => array('user-member')),
     '#weight' => 5,
     '#title' => t('History'),
   );
@@ -1875,7 +1875,7 @@
       '#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: modules/user/user.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.api.php,v
retrieving revision 1.10
diff -u -r1.10 user.api.php
--- modules/user/user.api.php	12 Aug 2009 12:36:05 -0000	1.10
+++ modules/user/user.api.php	20 Aug 2009 03:12:59 -0000
@@ -417,7 +417,7 @@
       '#type' => 'user_profile_item',
       '#title' => t('Blog'),
       '#markup' => l(t('View recent blog entries'), "blog/$account->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => $account->name))))),
-      '#attributes' => array('class' => 'blog'),
+      '#attributes' => array('class' => array('blog')),
     );
   }
 }
Index: modules/profile/profile.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.admin.inc,v
retrieving revision 1.26
diff -u -r1.26 profile.admin.inc
--- modules/profile/profile.admin.inc	31 Jul 2009 19:01:02 -0000	1.26
+++ modules/profile/profile.admin.inc	20 Aug 2009 03:12:59 -0000
@@ -116,9 +116,9 @@
         // 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 @@
       }
 
       // 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 @@
       }
       $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.266
diff -u -r1.266 profile.module
--- modules/profile/profile.module	12 Aug 2009 12:36:04 -0000	1.266
+++ modules/profile/profile.module	20 Aug 2009 03:12:59 -0000
@@ -351,7 +351,7 @@
         '#title' => $title,
         '#markup' => $value,
         '#weight' => $field->weight,
-        '#attributes' => array('class' => 'profile-' . $field->name),
+        '#attributes' => array('class' => array('profile-' . $field->name)),
       );
     }
   }
Index: modules/translation/translation.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/translation/translation.module,v
retrieving revision 1.54
diff -u -r1.54 translation.module
--- modules/translation/translation.module	31 Jul 2009 19:01:02 -0000	1.54
+++ modules/translation/translation.module	20 Aug 2009 03:12:59 -0000
@@ -178,12 +178,12 @@
           '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: themes/garland/template.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/template.php,v
retrieving revision 1.24
diff -u -r1.24 template.php
--- themes/garland/template.php	17 Aug 2009 19:14:42 -0000	1.24
+++ themes/garland/template.php	20 Aug 2009 03:12:59 -0000
@@ -19,8 +19,8 @@
  */
 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
Index: includes/tablesort.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/tablesort.inc,v
retrieving revision 1.51
diff -u -r1.51 tablesort.inc
--- includes/tablesort.inc	22 May 2009 11:33:17 -0000	1.51
+++ includes/tablesort.inc	20 Aug 2009 03:12:58 -0000
@@ -185,12 +185,7 @@
     $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_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/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.964
diff -u -r1.964 common.inc
--- includes/common.inc	19 Aug 2009 20:19:36 -0000	1.964
+++ includes/common.inc	20 Aug 2009 03:12:58 -0000
@@ -2260,12 +2260,7 @@
   // 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
@@ -3239,7 +3234,7 @@
  * 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
@@ -3248,7 +3243,7 @@
  * $row = array(...);
  * $rows[] = array(
  *   'data' => $row,
- *   'class' => 'draggable',
+ *   'class' => array('draggable'),
  * );
  * @endcode
  *
@@ -3266,7 +3261,7 @@
  * 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
@@ -4246,7 +4241,7 @@
       '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/locale.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/locale.inc,v
retrieving revision 1.224
diff -u -r1.224 locale.inc
--- includes/locale.inc	17 Aug 2009 19:14:39 -0000	1.224
+++ includes/locale.inc	20 Aug 2009 03:12:58 -0000
@@ -46,7 +46,7 @@
     $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 @@
           drupal_render($form['weight'][$key]),
           l(t('edit'), 'admin/config/international/language/edit/' . $key) . (($key != 'en' && $key != $default->language) ? ' ' . l(t('delete'), 'admin/config/international/language/delete/' . $key) : '')
         ),
-        'class' => 'draggable'
+        'class' => array('draggable'),
       );
     }
   }
@@ -2303,8 +2303,8 @@
       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/config/international/translate/edit/$lid", array('query' => drupal_get_destination())), 'class' => 'nowrap'),
-      array('data' => l(t('delete'), "admin/config/international/translate/delete/$lid", array('query' => drupal_get_destination())), 'class' => 'nowrap'),
+      array('data' => l(t('edit'), "admin/config/international/translate/edit/$lid", array('query' => drupal_get_destination())), 'class' => array('nowrap')),
+      array('data' => l(t('delete'), "admin/config/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.69
diff -u -r1.69 pager.inc
--- includes/pager.inc	11 Aug 2009 16:43:11 -0000	1.69
+++ includes/pager.inc	20 Aug 2009 03:12:58 -0000
@@ -298,13 +298,13 @@
   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,
       );
     }
@@ -313,7 +313,7 @@
     if ($i != $pager_max) {
       if ($i > 1) {
         $items[] = array(
-          'class' => 'pager-ellipsis',
+          'class' => array('pager-ellipsis'),
           'data' => '…',
         );
       }
@@ -321,19 +321,19 @@
       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),
           );
         }
@@ -348,17 +348,17 @@
     // 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/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.359
diff -u -r1.359 form.inc
--- includes/form.inc	19 Aug 2009 08:15:36 -0000	1.359
+++ includes/form.inc	20 Aug 2009 03:12:58 -0000
@@ -1595,12 +1595,12 @@
     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'];
@@ -1649,8 +1649,8 @@
  */
 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>';
 
@@ -1666,14 +1666,14 @@
     '#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;
@@ -1986,8 +1986,8 @@
  */
 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>';
 
@@ -2049,9 +2049,9 @@
  * @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',
@@ -2278,7 +2278,7 @@
   $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;
@@ -2331,13 +2331,7 @@
  * @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";
 }
@@ -2353,13 +2347,7 @@
  * @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']) . '" ') : '') .
@@ -2594,16 +2582,18 @@
  *   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/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.506
diff -u -r1.506 theme.inc
--- includes/theme.inc	19 Aug 2009 22:44:05 -0000	1.506
+++ includes/theme.inc	20 Aug 2009 03:12:58 -0000
@@ -1378,7 +1378,7 @@
  * @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 = '';
 
@@ -1389,18 +1389,18 @@
     $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)) . '>';
 
@@ -1508,7 +1508,7 @@
  *     ),
  *     // 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
@@ -1530,17 +1530,17 @@
  *     // 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
@@ -1559,7 +1559,7 @@
     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";
@@ -1645,12 +1645,7 @@
       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) . '>';
@@ -1675,7 +1670,7 @@
 function theme_table_select_header_cell() {
   drupal_add_js('misc/tableselect.js');
 
-  return array('class' => 'select-all');
+  return array('class' => array('select-all'));
 }
 
 /**
@@ -1767,10 +1762,10 @@
         $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/path/path.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.admin.inc,v
retrieving revision 1.27
diff -u -r1.27 path.admin.inc
--- modules/path/path.admin.inc	29 Jul 2009 06:39:34 -0000	1.27
+++ modules/path/path.admin.inc	20 Aug 2009 03:12:59 -0000
@@ -42,9 +42,6 @@
   $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 @@
         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 @@
  * @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/openid/openid.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.module,v
retrieving revision 1.52
diff -u -r1.52 openid.module
--- modules/openid/openid.module	12 Aug 2009 12:36:04 -0000	1.52
+++ modules/openid/openid.module	20 Aug 2009 03:12:59 -0000
@@ -96,11 +96,11 @@
   $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/aggregator/aggregator.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.pages.inc,v
retrieving revision 1.30
diff -u -r1.30 aggregator.pages.inc
--- modules/aggregator/aggregator.pages.inc	30 Jul 2009 19:24:20 -0000	1.30
+++ modules/aggregator/aggregator.pages.inc	20 Aug 2009 03:12:59 -0000
@@ -242,7 +242,7 @@
     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/aggregator/aggregator.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.admin.inc,v
retrieving revision 1.37
diff -u -r1.37 aggregator.admin.inc
--- modules/aggregator/aggregator.admin.inc	17 Aug 2009 19:14:40 -0000	1.37
+++ modules/aggregator/aggregator.admin.inc	20 Aug 2009 03:12:58 -0000
@@ -30,7 +30,7 @@
     $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 @@
     $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/simpletest/simpletest.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/simpletest.pages.inc,v
retrieving revision 1.14
diff -u -r1.14 simpletest.pages.inc
--- modules/simpletest/simpletest.pages.inc	15 Aug 2009 17:52:53 -0000	1.14
+++ modules/simpletest/simpletest.pages.inc	20 Aug 2009 03:12:59 -0000
@@ -72,8 +72,8 @@
   // 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 @@
     $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 @@
 
     $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 @@
       $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' => array($test_class . '-test', ($collapsed ? 'js-hide' : '')));
     }
     $js['simpletest-test-group-' . $test_class] = $current_js;
     unset($table[$key]);
@@ -259,7 +259,7 @@
       if ($assertion->message_group == 'Debug') {
         $class = 'simpletest-debug';
       }
-      $rows[] = array('data' => $row, 'class' => $class);
+      $rows[] = array('data' => $row, 'class' => array($class));
 
       $group_summary['#' . $assertion->status]++;
       $form['result']['summary']['#' . $assertion->status]++;
@@ -286,7 +286,7 @@
   $form['action'] = array(
     '#type' => 'fieldset',
     '#title' => t('Actions'),
-    '#attributes' => array('class' => 'container-inline'),
+    '#attributes' => array('class' => array('container-inline')),
     '#weight' => -11,
   );
 
Index: modules/search/search.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.303
diff -u -r1.303 search.module
--- modules/search/search.module	23 Jul 2009 20:58:26 -0000	1.303
+++ modules/search/search.module	20 Aug 2009 03:12:59 -0000
@@ -1070,7 +1070,7 @@
 
   $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/node/content_types.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v
retrieving revision 1.87
diff -u -r1.87 content_types.inc
--- modules/node/content_types.inc	14 Aug 2009 00:12:57 -0000	1.87
+++ modules/node/content_types.inc	20 Aug 2009 03:12:59 -0000
@@ -35,7 +35,7 @@
   }
 
   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.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.75
diff -u -r1.75 node.pages.inc
--- modules/node/node.pages.inc	19 Aug 2009 13:31:13 -0000	1.75
+++ modules/node/node.pages.inc	20 Aug 2009 03:12:59 -0000
@@ -502,8 +502,8 @@
     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/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1101
diff -u -r1.1101 node.module
--- modules/node/node.module	19 Aug 2009 13:31:13 -0000	1.1101
+++ modules/node/node.module	20 Aug 2009 03:12:59 -0000
@@ -1188,7 +1188,7 @@
   $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.
@@ -2101,7 +2101,7 @@
       '#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.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.60
diff -u -r1.60 node.admin.inc
--- modules/node/node.admin.inc	30 Jul 2009 19:24:21 -0000	1.60
+++ modules/node/node.admin.inc	20 Aug 2009 03:12:59 -0000
@@ -376,7 +376,7 @@
   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_modules_installed($modules) {
   // Clear node type cache for node permissions.
   node_type_clear();
-}
\ No newline at end of file
+}
Index: modules/poll/poll.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v
retrieving revision 1.304
diff -u -r1.304 poll.module
--- modules/poll/poll.module	19 Aug 2009 13:31:13 -0000	1.304
+++ modules/poll/poll.module	20 Aug 2009 03:12:59 -0000
@@ -775,21 +775,23 @@
   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: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.194
diff -u -r1.194 install.php
--- install.php	18 Aug 2009 11:03:12 -0000	1.194
+++ install.php	20 Aug 2009 03:12:58 -0000
@@ -1549,7 +1549,7 @@
     '#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',
@@ -1589,13 +1589,13 @@
     '#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: modules/field/modules/number/number.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/number/number.module,v
retrieving revision 1.12
diff -u -r1.12 number.module
--- modules/field/modules/number/number.module	19 Aug 2009 13:31:13 -0000	1.12
+++ modules/field/modules/number/number.module	20 Aug 2009 03:12:59 -0000
@@ -377,7 +377,7 @@
     // 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'],
@@ -497,4 +497,4 @@
  */
 function theme_number($element) {
   return $element['#children'];
-}
\ No newline at end of file
+}
Index: modules/field/field.form.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.form.inc,v
retrieving revision 1.15
diff -u -r1.15 field.form.inc
--- modules/field/field.form.inc	19 Aug 2009 13:31:12 -0000	1.15
+++ modules/field/field.form.inc	20 Aug 2009 03:12:59 -0000
@@ -196,7 +196,7 @@
         // 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')),
       );
     }
   }
@@ -221,7 +221,7 @@
       array(
         'data' => '<label>' . t('!title: !required', array('!title' => $element['#title'], '!required' => $required)) . "</label>",
         'colspan' => 2,
-        'class' => 'field-label',
+        'class' => array('field-label'),
       ),
       t('Order'),
     );
@@ -242,21 +242,21 @@
 
     // 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/tracker/tracker.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/tracker/tracker.pages.inc,v
retrieving revision 1.22
diff -u -r1.22 tracker.pages.inc
--- modules/tracker/tracker.pages.inc	2 Jul 2009 04:27:23 -0000	1.22
+++ modules/tracker/tracker.pages.inc	20 Aug 2009 03:12:59 -0000
@@ -59,7 +59,7 @@
       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/field_ui/field_ui.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field_ui/field_ui.admin.inc,v
retrieving revision 1.1
diff -u -r1.1 field_ui.admin.inc
--- modules/field_ui/field_ui.admin.inc	19 Aug 2009 13:31:13 -0000	1.1
+++ modules/field_ui/field_ui.admin.inc	20 Aug 2009 03:12:59 -0000
@@ -22,7 +22,7 @@
       $rows[$field_name]['data'][0] = $field['locked'] ? t('@field_name (Locked)', array('@field_name' => $field_name)) : $field_name;
       $rows[$field_name]['data'][1] = t($field_types[$field['type']]['label']);
       $rows[$field_name]['data'][2][] = l($bundles[$bundle]['label'], $admin_path . '/fields');
-      $rows[$field_name]['class'] = $field['locked'] ? 'menu-disabled' : '';
+      $rows[$field_name]['class'] = $field['locked'] ? array('menu-disabled') : array('');
     }
   }
   foreach ($rows as $field_name => $cell) {
@@ -298,19 +298,19 @@
     $row = new stdClass();
 
     // Add target classes for the tabledrag behavior.
-    $element['weight']['#attributes']['class'] = 'field-weight';
-    $element['hidden_name']['#attributes']['class'] = 'field-name';
+    $element['weight']['#attributes']['class'][] = 'field-weight';
+    $element['hidden_name']['#attributes']['class'][] = 'field-name';
     // Add target classes for the update selects behavior.
     switch ($element['#row_type']) {
       case 'add_new_field':
-        $element['type']['#attributes']['class'] = 'field-type-select';
-        $element['widget_type']['#attributes']['class'] = 'widget-type-select';
+        $element['type']['#attributes']['class'][] = 'field-type-select';
+        $element['widget_type']['#attributes']['class'][] = 'widget-type-select';
         break;
 
       case 'add_existing_field':
-        $element['field_name']['#attributes']['class'] = 'field-select';
-        $element['widget_type']['#attributes']['class'] = 'widget-type-select';
-        $element['label']['#attributes']['class'] = 'label-textfield';
+        $element['field_name']['#attributes']['class'][] = 'field-select';
+        $element['widget_type']['#attributes']['class'][] = 'widget-type-select';
+        $element['label']['#attributes']['class'][] = 'label-textfield';
         break;
     }
     foreach (element_children($element) as $child) {
Index: modules/toolbar/toolbar.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.module,v
retrieving revision 1.5
diff -u -r1.5 toolbar.module
--- modules/toolbar/toolbar.module	14 Aug 2009 15:30:59 -0000	1.5
+++ modules/toolbar/toolbar.module	20 Aug 2009 03:12:59 -0000
@@ -146,7 +146,7 @@
       // 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/image/image.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/image/image.admin.inc,v
retrieving revision 1.3
diff -u -r1.3 image.admin.inc
--- modules/image/image.admin.inc	17 Aug 2009 19:14:40 -0000	1.3
+++ modules/image/image.admin.inc	20 Aug 2009 03:12:59 -0000
@@ -580,7 +580,7 @@
     $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);
@@ -610,7 +610,7 @@
 
   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);
@@ -620,7 +620,7 @@
     }
     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']);
@@ -629,7 +629,7 @@
 
     $rows[] = array(
       'data' => $row,
-      'class' => 'draggable',
+      'class' => array('draggable'),
     );
   }
 
@@ -743,7 +743,7 @@
     }
   }
 
-  return theme('table', array(), $rows, array('class' => 'image-anchor'));
+  return theme('table', array(), $rows, array('class' => array('image-anchor')));
 }
 
 /**
Index: modules/filter/filter.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.admin.inc,v
retrieving revision 1.32
diff -u -r1.32 filter.admin.inc
--- modules/filter/filter.admin.inc	15 Aug 2009 06:50:29 -0000	1.32
+++ modules/filter/filter.admin.inc	20 Aug 2009 03:12:59 -0000
@@ -69,7 +69,7 @@
   foreach (element_children($form) as $id) {
     $element = $form[$id];
     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']),
@@ -79,7 +79,7 @@
           drupal_render($element['configure']),
           drupal_render($element['delete']),
         ),
-        'class' => 'draggable',
+        'class' => array('draggable'),
       );
       unset($form[$id]);
     }
@@ -419,10 +419,10 @@
   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.269
diff -u -r1.269 filter.module
--- modules/filter/filter.module	15 Aug 2009 06:45:31 -0000	1.269
+++ modules/filter/filter.module	20 Aug 2009 03:12:59 -0000
@@ -224,15 +224,15 @@
         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),
           );
         }
       }
@@ -251,9 +251,9 @@
       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);
@@ -502,7 +502,7 @@
   $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">',
@@ -523,7 +523,7 @@
     '#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/color/color.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/color/color.module,v
retrieving revision 1.65
diff -u -r1.65 color.module
--- modules/color/color.module	17 Aug 2009 19:14:40 -0000	1.65
+++ modules/color/color.module	20 Aug 2009 03:12:59 -0000
@@ -60,7 +60,7 @@
   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/blog/blog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.module,v
retrieving revision 1.329
diff -u -r1.329 blog.module
--- modules/blog/blog.module	12 Aug 2009 12:36:04 -0000	1.329
+++ modules/blog/blog.module	20 Aug 2009 03:12:59 -0000
@@ -50,7 +50,7 @@
       '#type' => 'user_profile_item',
       '#title' => t('Blog'),
       '#markup' => l(t('View recent blog entries'), "blog/$account->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => $account->name))))),
-      '#attributes' => array('class' => 'blog'),
+      '#attributes' => array('class' => array('blog')),
     );
   }
 }
@@ -101,7 +101,7 @@
       $node->content['links']['blog'] = array(
         '#theme' => 'links',
         '#links' => $links,
-        '#attributes' => array('class' => 'links inline'),
+        '#attributes' => array('class' => array('links', 'inline')),
       );
     }
   }
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.753
diff -u -r1.753 comment.module
--- modules/comment/comment.module	17 Aug 2009 13:10:45 -0000	1.753
+++ modules/comment/comment.module	20 Aug 2009 03:12:59 -0000
@@ -552,7 +552,7 @@
     $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
@@ -825,7 +825,7 @@
     $comment->content['links']['comment'] = array(
       '#theme' => 'links',
       '#links' => comment_links($comment),
-      '#attributes' => array('class' => 'links inline'),
+      '#attributes' => array('class' => array('links', 'inline')),
     );
   }
 
Index: modules/field/modules/text/text.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/text/text.module,v
retrieving revision 1.18
diff -u -r1.18 text.module
--- modules/field/modules/text/text.module	19 Aug 2009 13:31:13 -0000	1.18
+++ modules/field/modules/text/text.module	20 Aug 2009 03:12:59 -0000
@@ -663,7 +663,7 @@
     '#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'],
@@ -808,7 +808,7 @@
     $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/block/block.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v
retrieving revision 1.48
diff -u -r1.48 block.admin.inc
--- modules/block/block.admin.inc	12 Aug 2009 11:43:09 -0000	1.48
+++ modules/block/block.admin.inc	20 Aug 2009 03:12:59 -0000
@@ -515,12 +515,12 @@
       $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/upload/upload.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.module,v
retrieving revision 1.247
diff -u -r1.247 upload.module
--- modules/upload/upload.module	17 Aug 2009 19:14:41 -0000	1.247
+++ modules/upload/upload.module	20 Aug 2009 03:12:59 -0000
@@ -78,7 +78,7 @@
     $node->content['links']['upload_attachments'] = array(
       '#theme' => 'links',
       '#links' => $links,
-      '#attributes' => array('class' => 'links inline'),
+      '#attributes' => array('class' => array('links', 'inline')),
     );
   }
 }
@@ -448,7 +448,7 @@
     }
   }
   if (count($rows)) {
-    return theme('table', $header, $rows, array('class' => 'attachments'));
+    return theme('table', $header, $rows, array('class' => array('attachments')));
   }
 }
 
@@ -604,7 +604,7 @@
 
   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']);
@@ -612,7 +612,7 @@
     $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/dblog/dblog.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.admin.inc,v
retrieving revision 1.24
diff -u -r1.24 dblog.admin.inc
--- modules/dblog/dblog.admin.inc	16 Aug 2009 17:57:44 -0000	1.24
+++ modules/dblog/dblog.admin.inc	20 Aug 2009 03:12:59 -0000
@@ -84,7 +84,7 @@
         $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 @@
     $build['dblog_table'] = array(
       '#theme' => 'table', 
       '#rows' => $rows, 
-      '#attributes' => array('class' => 'dblog-event'),
+      '#attributes' => array('class' => array('dblog-event')),
     );
     return $build;
   }
Index: modules/menu/menu.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.module,v
retrieving revision 1.195
diff -u -r1.195 menu.module
--- modules/menu/menu.module	20 Jul 2009 18:51:33 -0000	1.195
+++ modules/menu/menu.module	20 Aug 2009 03:12:59 -0000
@@ -405,7 +405,7 @@
       '#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 @@
       '#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/menu/menu.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.admin.inc,v
retrieving revision 1.53
diff -u -r1.53 menu.admin.inc
--- modules/menu/menu.admin.inc	20 Jul 2009 18:51:33 -0000	1.53
+++ modules/menu/menu.admin.inc	20 Aug 2009 03:12:59 -0000
@@ -82,7 +82,7 @@
     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 @@
 
   $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 @@
       }
 
       // 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 @@
     '#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 @@
     '#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: themes/seven/template.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/seven/template.php,v
retrieving revision 1.3
diff -u -r1.3 template.php
--- themes/seven/template.php	14 Aug 2009 07:57:30 -0000	1.3
+++ themes/seven/template.php	20 Aug 2009 03:12:59 -0000
@@ -76,12 +76,12 @@
     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'];
