summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorClark Tomlinson <fallen013@gmail.com>2015-03-31 12:21:30 -0400
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:29 +0200
commitea6b53042d8464792c5ce7545d618f90128c914d (patch)
tree63f9b452a43c6ac17256dbbf5588be6eb0a6b9fe /apps
parent48e3864c779a6ac6a8222a5d7afbb91a1a84996d (diff)
downloadnextcloud-server-ea6b53042d8464792c5ce7545d618f90128c914d.tar.gz
nextcloud-server-ea6b53042d8464792c5ce7545d618f90128c914d.zip
fixing test helper and undoing fubar in class...
Diffstat (limited to 'apps')
-rw-r--r--apps/encryption/lib/session.php7
-rw-r--r--apps/encryption/tests/lib/SessionTest.php2
2 files changed, 4 insertions, 5 deletions
diff --git a/apps/encryption/lib/session.php b/apps/encryption/lib/session.php
index 785991ec2e0..5e973913769 100644
--- a/apps/encryption/lib/session.php
+++ b/apps/encryption/lib/session.php
@@ -54,7 +54,7 @@ class Session {
*/
public function getStatus() {
$status = $this->session->get('encryptionInitialized');
- if (!$status) {
+ if (is_null($status)) {
$status = self::NOT_INITIALIZED;
}
@@ -69,8 +69,7 @@ class Session {
*/
public function getPrivateKey() {
$key = $this->session->get('privateKey');
-
- if (!$key) {
+ if (is_null($key)) {
throw new Exceptions\PrivateKeyMissingException('no private key stored in session');
}
return $key;
@@ -83,7 +82,7 @@ class Session {
*/
public function isPrivateKeySet() {
$key = $this->session->get('privateKey');
- if (!$key) {
+ if (is_null($key)) {
return false;
}
diff --git a/apps/encryption/tests/lib/SessionTest.php b/apps/encryption/tests/lib/SessionTest.php
index ea7ddf37a4b..dbf3ecc45a1 100644
--- a/apps/encryption/tests/lib/SessionTest.php
+++ b/apps/encryption/tests/lib/SessionTest.php
@@ -104,7 +104,7 @@ class SessionTest extends TestCase {
if (!empty(self::$tempStorage[$key])) {
return self::$tempStorage[$key];
}
- return false;
+ return null;
}
/**