MDL-38016 Theme Bootstrap: Fix for unit tests undefined variable

This commit is contained in:
Damyon Wiese 2013-04-03 10:58:23 +08:00
parent 29c1fb339d
commit 686730243e

View File

@ -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';
}