mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
json_decode: always throw on error and fix other psalm issues
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
df0f7b8d85
commit
6f945a2369
6 changed files with 19 additions and 23 deletions
|
|
@ -38,13 +38,13 @@ readonly class ContainerDefinitionFetcher {
|
|||
*/
|
||||
private function GetDefinition(): array
|
||||
{
|
||||
$data = json_decode(file_get_contents(DataConst::GetContainersDefinitionPath()), true);
|
||||
$data = json_decode((string)file_get_contents(DataConst::GetContainersDefinitionPath()), true, 512, JSON_THROW_ON_ERROR);
|
||||
|
||||
$additionalContainerNames = [];
|
||||
foreach ($this->configurationManager->GetEnabledCommunityContainers() as $communityContainer) {
|
||||
if ($communityContainer !== '') {
|
||||
$path = DataConst::GetCommunityContainersDirectory() . '/' . $communityContainer . '/' . $communityContainer . '.json';
|
||||
$additionalData = json_decode(file_get_contents($path), true);
|
||||
$additionalData = json_decode((string)file_get_contents($path), true, 512, JSON_THROW_ON_ERROR);
|
||||
$data = array_merge_recursive($data, $additionalData);
|
||||
if (isset($additionalData['aio_services_v1'][0]['display_name']) && $additionalData['aio_services_v1'][0]['display_name'] !== '') {
|
||||
// Store container_name of community containers in variable for later
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue