diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2022-05-04 14:18:41 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2022-05-04 14:18:41 +0000 |
| commit | 0d95625c2ab0eabe98e724ab79be0087093cc35b (patch) | |
| tree | f911e16bfb52f4aceacf9e9ad4c8d31923e26a6e /lib/bootstrap.php | |
| parent | e1f835675363c17fbf5d269f6d1d1f84b6727886 (diff) | |
fix for BIESt #957
Merge request studip/studip!554
Diffstat (limited to 'lib/bootstrap.php')
| -rw-r--r-- | lib/bootstrap.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bootstrap.php b/lib/bootstrap.php index 608f929..20c1be5 100644 --- a/lib/bootstrap.php +++ b/lib/bootstrap.php @@ -50,11 +50,11 @@ if (isset($_SERVER['SERVER_NAME'])) { explode(':', $_SERVER['SERVER_NAME']); } - $ABSOLUTE_URI_STUDIP = $_SERVER['HTTPS'] == 'on' ? 'https' : 'http'; + $ABSOLUTE_URI_STUDIP = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https' : 'http'; $ABSOLUTE_URI_STUDIP .= '://'.$_SERVER['SERVER_NAME']; - if ($_SERVER['HTTPS'] == 'on' && $_SERVER['SERVER_PORT'] != 443 || - $_SERVER['HTTPS'] != 'on' && $_SERVER['SERVER_PORT'] != 80) { + if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' && $_SERVER['SERVER_PORT'] != 443 || + empty($SERVER['HTTPS']) && $_SERVER['SERVER_PORT'] != 80) { $ABSOLUTE_URI_STUDIP .= ':'.$_SERVER['SERVER_PORT']; } |
