Explorar el Código

Handle strict typing in Checker and fix tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/v14.0.0beta1
Roeland Jago Douma hace 6 años
padre
commit
72e745be26
No account linked to committer's email address

+ 6
- 1
lib/private/IntegrityCheck/Checker.php Ver fichero

@@ -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.');
}

+ 3
- 0
tests/lib/IntegrityCheck/CheckerTest.php Ver fichero

@@ -58,6 +58,9 @@ class CheckerTest extends TestCase {
$this->cacheFactory = $this->createMock(ICacheFactory::class);
$this->appManager = $this->createMock(IAppManager::class);

$this->config->method('getAppValue')
->will($this->returnArgument(2));

$this->cacheFactory
->expects($this->any())
->method('createDistributed')

Cargando…
Cancelar
Guardar