Merge pull request #4040 from halkyon/user-agent

BUG Check for existence of HTTP_USER_AGENT to avoid E_NOTICE error.
This commit is contained in:
Damian Mooyman 2015-03-26 13:19:02 +13:00
commit d71e2ea552

View File

@ -361,7 +361,8 @@ class HTTP {
if(
$body &&
Director::is_https() &&
strstr($_SERVER["HTTP_USER_AGENT"], 'MSIE')==true &&
isset($_SERVER['HTTP_USER_AGENT']) &&
strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE')==true &&
strstr($contentDisposition, 'attachment;')==true
) {
// IE6-IE8 have problems saving files when https and no-cache are used