Skip to content

Commit

Permalink
Merge 66c139d into 9cd4150
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Mar 12, 2020
2 parents 9cd4150 + 66c139d commit 9475298
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/DeferredImageStorageFilesystem.php
Expand Up @@ -200,6 +200,12 @@ private function getConfigPath(string $path): string
*/
private function decode(string $contents): array
{
return json_decode($contents, true);
$content = json_decode($contents, true);

if (!\is_array($content)) {
throw new \RuntimeException('Invalid JSON: '.json_last_error_msg());
}

return $content;
}
}

0 comments on commit 9475298

Please sign in to comment.