prevent error involving webdav workaround

This commit is contained in:
Robin Appelman 2011-10-13 21:55:02 +02:00
parent f1fd374a6f
commit db2fb38746
1 changed files with 1 additions and 1 deletions

View File

@ -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);