[Pkg-owncloud-commits] [owncloud] 12/27: Fix "Call to a member function getUID() on boolean" in Crypt

David Prévot taffit at moszumanska.debian.org
Wed Oct 28 17:03:05 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v8.1.4RC2
in repository owncloud.

commit 1cf61baa41c5ae8229f92a2132938e5787c013e9
Author: Joas Schilling <nickvergessen at owncloud.com>
Date:   Thu Oct 22 11:46:37 2015 +0200

    Fix "Call to a member function getUID() on boolean" in Crypt
---
 apps/encryption/lib/crypto/crypt.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/apps/encryption/lib/crypto/crypt.php b/apps/encryption/lib/crypto/crypt.php
index f3cf38f..0945325 100644
--- a/apps/encryption/lib/crypto/crypt.php
+++ b/apps/encryption/lib/crypto/crypt.php
@@ -49,7 +49,7 @@ class Crypt {
 	 */
 	private $logger;
 	/**
-	 * @var IUser
+	 * @var string
 	 */
 	private $user;
 	/**
@@ -64,7 +64,7 @@ class Crypt {
 	 */
 	public function __construct(ILogger $logger, IUserSession $userSession, IConfig $config) {
 		$this->logger = $logger;
-		$this->user = $userSession && $userSession->isLoggedIn() ? $userSession->getUser() : false;
+		$this->user = $userSession && $userSession->isLoggedIn() ? $userSession->getUser()->getUID() : '"no user given"';
 		$this->config = $config;
 	}
 
@@ -79,7 +79,7 @@ class Crypt {
 		$res = $this->getOpenSSLPKey();
 
 		if (!$res) {
-			$log->error("Encryption Library couldn't generate users key-pair for {$this->user->getUID()}",
+			$log->error("Encryption Library couldn't generate users key-pair for {$this->user}",
 				['app' => 'encryption']);
 
 			if (openssl_error_string()) {
@@ -98,7 +98,7 @@ class Crypt {
 				'privateKey' => $privateKey
 			];
 		}
-		$log->error('Encryption library couldn\'t export users private key, please check your servers OpenSSL configuration.' . $this->user->getUID(),
+		$log->error('Encryption library couldn\'t export users private key, please check your servers OpenSSL configuration.' . $this->user,
 			['app' => 'encryption']);
 		if (openssl_error_string()) {
 			$log->error('Encryption Library:' . openssl_error_string(),

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list