mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +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
|
|
@ -636,7 +636,7 @@ class ConfigurationManager
|
|||
return "";
|
||||
}
|
||||
|
||||
return trim(file_get_contents(DataConst::GetBackupPublicKey()));
|
||||
return trim((string)file_get_contents(DataConst::GetBackupPublicKey()));
|
||||
}
|
||||
|
||||
public function GetBorgRestorePassword() : string {
|
||||
|
|
@ -1040,7 +1040,7 @@ class ConfigurationManager
|
|||
apcu_add($filePath, $fileContents);
|
||||
}
|
||||
}
|
||||
$json = is_string($fileContents) ? json_decode($fileContents, true) : false;
|
||||
$json = is_string($fileContents) ? json_decode($fileContents, true, 512, JSON_THROW_ON_ERROR) : false;
|
||||
if(is_array($json) && is_array($json['aio_services_v1'])) {
|
||||
foreach ($json['aio_services_v1'] as $service) {
|
||||
$documentation = is_string($service['documentation']) ? $service['documentation'] : '';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue