Skip to content

Commit c636917

Browse files
committed
fix: minor corrections
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
1 parent 1619d5b commit c636917

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/Service/ExAppPreferenceService.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ public function setUserConfigValue(string $userId, string $appId, string $config
5151
'appid' => $appId,
5252
'configkey' => $configKey,
5353
'configvalue' => $sensitive ? $encryptedValue ?? '' : $configValue ?? '',
54-
'sensitive' => $sensitive ? 1 : 0,
54+
'sensitive' => $sensitive ?? 0,
5555
]));
5656
} catch (Exception $e) {
5757
$this->logger->error('Error while inserting new config value: ' . $e->getMessage(), ['exception' => $e]);
5858
return null;
5959
}
6060
} else {
61-
$exAppPreference->setConfigvalue($sensitive ? $encryptedValue ?? '' : $configValue);
61+
$exAppPreference->setConfigvalue($sensitive ? $encryptedValue : $configValue);
6262
if ($sensitive !== null) {
6363
$exAppPreference->setSensitive($sensitive);
6464
}
@@ -81,7 +81,7 @@ public function setUserConfigValue(string $userId, string $appId, string $config
8181
public function getUserConfigValues(string $userId, string $appId, array $configKeys): ?array {
8282
try {
8383
return array_map(function (ExAppPreference $exAppPreference) {
84-
$value = $exAppPreference->getConfigvalue();
84+
$value = $exAppPreference->getConfigvalue() ?? '';
8585
if ($value !== '' && $exAppPreference->getSensitive()) {
8686
try {
8787
$value = $this->crypto->decrypt($value);

0 commit comments

Comments
 (0)