From 686730243e419be81178e36da89b58f893b6a4ce Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Wed, 3 Apr 2013 10:58:23 +0800 Subject: [PATCH] MDL-38016 Theme Bootstrap: Fix for unit tests undefined variable --- theme/bootstrap/config.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/theme/bootstrap/config.php b/theme/bootstrap/config.php index 636fa2eba7e..31c7d2832dd 100644 --- a/theme/bootstrap/config.php +++ b/theme/bootstrap/config.php @@ -159,7 +159,11 @@ $THEME->javascripts = array( 'headercollapse', ); -if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') || strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7')) { +$useragent = ''; +if (!empty($_SERVER['HTTP_USER_AGENT'])) { + $useragent = $_SERVER['HTTP_USER_AGENT']; +} +if (strpos($useragent, 'MSIE 8') || strpos($useragent, 'MSIE 7')) { $THEME->javascripts[] = 'html5shiv'; }