Index: includes/database/database.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/database.inc,v
retrieving revision 1.97
diff -u -r1.97 database.inc
--- includes/database/database.inc	15 Feb 2010 22:12:27 -0000	1.97
+++ includes/database/database.inc	16 Feb 2010 23:07:41 -0000
@@ -1517,7 +1517,8 @@
       // and we put that in the user_agent header. The header HMAC was already
       // validated in bootstrap.inc.
       if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/^(simpletest\d+);/", $_SERVER['HTTP_USER_AGENT'], $matches)) {
-        $db_prefix .= $matches[1];
+        $db_prefix_string = is_array($db_prefix) ? $db_prefix['default'] : $db_prefix;
+        $db_prefix = $db_prefix_string . $matches[1];
       }
       return $new_connection;
     }
