From 0041711fe3475d4b6c6955b2de0291e1966b2d23 Mon Sep 17 00:00:00 2001
From: Florin Peter <github@florin-peter.de>
Date: Tue, 28 May 2013 09:36:14 +0200
Subject: [PATCH] fix for undefined index

---
 apps/files_encryption/lib/util.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index dba01c4d96..48485cf2e8 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -131,7 +131,7 @@ class Util {
 			$this->userId = $this->publicShareKeyId;
 
 			// only handle for files_sharing app
-			if ($GLOBALS['app'] === 'files_sharing') {
+			if (isset($GLOBALS['app']) && $GLOBALS['app'] === 'files_sharing') {
 				$this->userDir = '/' . $GLOBALS['fileOwner'];
 				$this->fileFolderName = 'files';
 				$this->userFilesDir = '/' . $GLOBALS['fileOwner'] . '/'
-- 
GitLab