summaryrefslogtreecommitdiffstats
path: root/lib/private/IntegrityCheck
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-02-21 21:09:08 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-02-21 21:09:08 +0100
commit72e745be26647b1ce1ca3240cb2ffbe20cfe91dc (patch)
tree1c223aeb0c2a1081409e6acaaf67c11eb7cf5071 /lib/private/IntegrityCheck
parent4d5f2e64a5c6b76d4c74b595b93bfcfc850f553a (diff)
downloadnextcloud-server-72e745be26647b1ce1ca3240cb2ffbe20cfe91dc.tar.gz
nextcloud-server-72e745be26647b1ce1ca3240cb2ffbe20cfe91dc.zip
Handle strict typing in Checker and fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/IntegrityCheck')
-rw-r--r--lib/private/IntegrityCheck/Checker.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php
index f1a04d0eac4..44544b6770e 100644
--- a/lib/private/IntegrityCheck/Checker.php
+++ b/lib/private/IntegrityCheck/Checker.php
@@ -333,7 +333,12 @@ class Checker {
return [];
}
- $signatureData = json_decode($this->fileAccessHelper->file_get_contents($signaturePath), true);
+ $content = $this->fileAccessHelper->file_get_contents($signaturePath);
+ $signatureData = null;
+
+ if (\is_string($content)) {
+ $signatureData = json_decode($content, true);
+ }
if(!\is_array($signatureData)) {
throw new InvalidSignatureException('Signature data not found.');
}