Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>tags/v14.0.0beta1
@@ -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.'); | |||
} |
@@ -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') |