Index: includes/common.inc
===================================================================
--- includes/common.inc	(revision 13734)
+++ includes/common.inc	(working copy)
@@ -489,7 +489,7 @@
   // user-agent is used to ensure that multiple testing sessions running at the
   // same time won't interfere with each other as they would if the database
   // prefix were stored statically in a file or database variable.
-  if (preg_match("/simpletest\d+/", $GLOBALS['db_prefix'], $matches)) {
+  if ( !is_array($GLOBALS['db_prefix']) && preg_match("/simpletest\d+/", $GLOBALS['db_prefix'], $matches)) {
     $defaults['User-Agent'] = 'User-Agent: ' . $matches[0];
   }
 
