summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
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;
}
/**