From b65538567d30138db7c91b5d92717a0e2cb0a240 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 17 Jun 2009 13:40:26 +0000 Subject: - Patch #276008 by lilou, Arancaytar: missing user agent should not trigger a notice per the HTTP specification. --- includes/database/database.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'includes/database/database.inc') diff --git a/includes/database/database.inc b/includes/database/database.inc index f1185c77a..20b8ba5b5 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -1358,7 +1358,7 @@ abstract class Database { // We need to pass around the simpletest database prefix in the request // and we put that in the user_agent header. - if (preg_match("/^simpletest\d+$/", $_SERVER['HTTP_USER_AGENT'])) { + if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/^simpletest\d+$/", $_SERVER['HTTP_USER_AGENT'])) { $db_prefix .= $_SERVER['HTTP_USER_AGENT']; } return $new_connection; -- cgit v1.2.3