From db2fb38746bb9d89b402c3a768a247945d813989 Mon Sep 17 00:00:00 2001 From: Robin Appelman <icewind1991@gmail.com> Date: Thu, 13 Oct 2011 21:55:02 +0200 Subject: [PATCH] prevent error involving webdav workaround --- lib/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base.php b/lib/base.php index 57a3ae8669b..ade4d889631 100644 --- a/lib/base.php +++ b/lib/base.php @@ -82,7 +82,7 @@ class OC{ ini_set('arg_separator.output','&'); //set http auth headers for apache+php-cgi work around - if (preg_match('/Basic\s+(.*)$/i', $_SERVER['HTTP_AUTHORIZATION'], $matches)) + if (isset($_SERVER['HTTP_AUTHORIZATION']) && preg_match('/Basic\s+(.*)$/i', $_SERVER['HTTP_AUTHORIZATION'], $matches)) { list($name, $password) = explode(':', base64_decode($matches[1])); $_SERVER['PHP_AUTH_USER'] = strip_tags($name); -- GitLab