From b04816e0fe30dab62d27bbf3ff08a15a2a14a13a Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sun, 7 Mar 2010 08:08:37 +0000 Subject: [PATCH] #716394 by boombatower: SimpleTest should respect table prefixes. --- includes/database/database.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/database/database.inc b/includes/database/database.inc index b988c83eb80..c74ae2254c9 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -1540,7 +1540,8 @@ abstract class Database { // 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; }