summaryrefslogtreecommitdiff
path: root/includes/database/database.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-06-17 13:40:26 +0000
committerDries Buytaert <dries@buytaert.net>2009-06-17 13:40:26 +0000
commitb65538567d30138db7c91b5d92717a0e2cb0a240 (patch)
tree24b6835894edf9aefa9261a35a768b7b8015bf70 /includes/database/database.inc
parent1a089351e0f7b8a51399f5eded059beae0ae0b7b (diff)
downloadbrdo-b65538567d30138db7c91b5d92717a0e2cb0a240.tar.gz
brdo-b65538567d30138db7c91b5d92717a0e2cb0a240.tar.bz2
- Patch #276008 by lilou, Arancaytar: missing user agent should not trigger a notice per the HTTP specification.
Diffstat (limited to 'includes/database/database.inc')
-rw-r--r--includes/database/database.inc2
1 files changed, 1 insertions, 1 deletions
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;