diff --git a/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php b/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php index c606963536715..a7e5276762d11 100644 --- a/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php +++ b/apps/settings/lib/Settings/Admin/ArtificialIntelligence.php @@ -143,7 +143,7 @@ public function getForm() { $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': diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php index e263195d35ea1..8afc62a05d4b6 100644 --- a/lib/private/TaskProcessing/Manager.php +++ b/lib/private/TaskProcessing/Manager.php @@ -572,7 +572,7 @@ private function _getTaskTypeSettings(): array { if ($json === '') { return []; } - return json_decode($json, true); + return json_decode($json, true, flags: JSON_THROW_ON_ERROR); } /**