aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php
diff options
context:
space:
mode:
authorJana Peper <jana.peper@nextcloud.com>2024-12-12 15:47:01 +0100
committerjanepie <49834966+janepie@users.noreply.github.com>2024-12-18 18:32:34 +0100
commitd87302c651dfb18d80856c07d7a16e9c97d68bb0 (patch)
treed5d91157e3cd1dc7031ad87e5774d2f8eace4e38 /apps/settings/lib/Settings/Admin/ArtificialIntelligence.php
parent8042a82c64e6e73467f0f943fdadde97c837edc3 (diff)
downloadnextcloud-server-d87302c651dfb18d80856c07d7a16e9c97d68bb0.tar.gz
nextcloud-server-d87302c651dfb18d80856c07d7a16e9c97d68bb0.zip
feat: add error flags for json_decode
Signed-off-by: Jana Peper <jana.peper@nextcloud.com>
Diffstat (limited to 'apps/settings/lib/Settings/Admin/ArtificialIntelligence.php')
-rw-r--r--apps/settings/lib/Settings/Admin/ArtificialIntelligence.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php b/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php
index c6069635367..a7e5276762d 100644
--- a/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php
+++ b/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php
@@ -143,7 +143,7 @@ class ArtificialIntelligence implements IDelegatedSettings {
$value = $defaultValue;
$json = $this->config->getAppValue('core', $key, '');
if ($json !== '') {
- $value = json_decode($json, true);
+ $value = json_decode($json, true, flags: JSON_THROW_ON_ERROR);
switch ($key) {
case 'ai.taskprocessing_provider_preferences':
case 'ai.taskprocessing_type_preferences':