From f33165146b5482a2c3a2bd6339c4513e3e1b0309 Mon Sep 17 00:00:00 2001 From: "Helmut K. C. Tessarek" Date: Wed, 13 Jun 2018 18:22:14 +0200 Subject: fix Undefined index: SERVER_SOFTWARE Signed-off-by: Helmut K. C. Tessarek --- lib/Sections/ServerSection.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Sections/ServerSection.php b/lib/Sections/ServerSection.php index 53d7978..354cdb8 100644 --- a/lib/Sections/ServerSection.php +++ b/lib/Sections/ServerSection.php @@ -83,7 +83,11 @@ SELECT * FROM `oc_appconfig` WHERE `appid` = \'user_ldap\'; Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.', IDetail::TYPE_COLLAPSIBLE_PREFORMAT); } private function getWebserver() { - return $_SERVER['SERVER_SOFTWARE'] . ' (' . PHP_SAPI . ')'; + if (isset($_SERVER['SERVER_SOFTWARE']) && !empty($_SERVER['SERVER_SOFTWARE'])) { + return $_SERVER['SERVER_SOFTWARE'] . ' (' . PHP_SAPI . ')'; + } else { + return 'Unknown' . ' (' . PHP_SAPI . ')'; + } } private function getNextcloudVersion() { -- cgit v1.2.3