From f2b86d0227d080dd4395efaf5fb086b024af0c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Mon, 4 Mar 2013 17:58:56 +0100 Subject: [PATCH] make sure that $this->userId is initialized before using it as a parameter --- apps/files_encryption/lib/stream.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php index f4bd6f1b6b0..6074638ab39 100644 --- a/apps/files_encryption/lib/stream.php +++ b/apps/files_encryption/lib/stream.php @@ -68,6 +68,8 @@ class Stream { private $rootView; // a fsview object set to '/' public function stream_open( $path, $mode, $options, &$opened_path ) { + + $this->userId = \OCP\User::getUser(); // Get access to filesystem via filesystemview object if ( !self::$view ) { @@ -82,9 +84,7 @@ class Stream { $this->rootView = new \OC_FilesystemView( $this->userId . '/' ); } - - $this->userId = \OCP\User::getUser(); - + // Get the bare file path $path = str_replace( 'crypt://', '', $path );