diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-03-04 17:58:56 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-03-04 17:58:56 +0100 |
commit | f2b86d0227d080dd4395efaf5fb086b024af0c95 (patch) | |
tree | cbb8322545fe40a77293d52da8cf992af1675e0e | |
parent | e65e6a12f1270faec377363f02f27ddd7d68b8e9 (diff) | |
download | nextcloud-server-f2b86d0227d080dd4395efaf5fb086b024af0c95.tar.gz nextcloud-server-f2b86d0227d080dd4395efaf5fb086b024af0c95.zip |
make sure that $this->userId is initialized before using it as a parameter
-rw-r--r-- | apps/files_encryption/lib/stream.php | 6 |
1 files 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 ); |