mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Check for existence of HTTP_USER_AGENT to avoid E_NOTICE error.
In some cases, a request may not have an HTTP_USER_AGENT. This should check the variable exists before attempting to check it. The specific case where it failed for me was Active Directory Federation Services sending a web request to a SilverStripe site, but failing because it doesn't have an agent string.
This commit is contained in:
parent
ed4db4f135
commit
a7d3f89136
@ -361,7 +361,8 @@ class HTTP {
|
|||||||
if(
|
if(
|
||||||
$body &&
|
$body &&
|
||||||
Director::is_https() &&
|
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
|
strstr($contentDisposition, 'attachment;')==true
|
||||||
) {
|
) {
|
||||||
// IE6-IE8 have problems saving files when https and no-cache are used
|
// IE6-IE8 have problems saving files when https and no-cache are used
|
||||||
|
Loading…
Reference in New Issue
Block a user