mirror of
https://github.com/humhub/humhub.git
synced 2025-01-29 04:17:39 +01:00
Fix undefined $_SERVER['SERVER_SOFTWARE'] (#5021)
This commit is contained in:
parent
f5679dc944
commit
4e2e9fe470
@ -14,6 +14,7 @@ HumHub Changelog
|
||||
- Fix #4989: Translate profile field title in admin list
|
||||
- Fix #5002: Fix loading of fixture spaces on tests
|
||||
- Fix #5018: Activity stream problems with many user accounts
|
||||
- Fix #5013: XSendFile broken when no SERVER_NAME header provided
|
||||
|
||||
|
||||
1.8.1 (March 12, 2021)
|
||||
|
@ -21,7 +21,7 @@ class Response extends \yii\web\Response
|
||||
*/
|
||||
public function xSendFile($filePath, $attachmentName = null, $options = [])
|
||||
{
|
||||
if (strpos($_SERVER['SERVER_SOFTWARE'], 'nginx') === 0) {
|
||||
if (isset($_SERVER['SERVER_SOFTWARE']) && stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') === 0) {
|
||||
// set nginx specific X-Sendfile header name
|
||||
$options['xHeader'] = 'X-Accel-Redirect';
|
||||
// make path relative to docroot
|
||||
|
Loading…
x
Reference in New Issue
Block a user