Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-10-02 22:56:20 +0300
committerLukas Reschke <lukas@owncloud.com>2015-10-02 22:56:20 +0300
commit8f4611e21d334ea3135bbdbf9519236bb4b6b173 (patch)
treeca3332a653fb807e3a7c0be52d5268ad9dd3cd87 /settings/admin.php
parent94013ffb82575b625334bdb57e6a7b9d2b9634bd (diff)
Check if decoded JSON returned null
The value might return null resulting in a PHP error. Fixes https://github.com/owncloud/core/issues/19542
Diffstat (limited to 'settings/admin.php')
-rw-r--r--settings/admin.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/settings/admin.php b/settings/admin.php
index ec49b3e823f..aa891314fab 100644
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -88,7 +88,7 @@ $excludeGroups = $appConfig->getValue('core', 'shareapi_exclude_groups', 'no') =
$template->assign('shareExcludeGroups', $excludeGroups);
$excludedGroupsList = $appConfig->getValue('core', 'shareapi_exclude_groups_list', '');
$excludedGroupsList = json_decode($excludedGroupsList);
-$template->assign('shareExcludedGroupsList', implode('|', $excludedGroupsList));
+$template->assign('shareExcludedGroupsList', !is_null($excludedGroupsList) ? implode('|', $excludedGroupsList) : '');
$template->assign('encryptionEnabled', \OC::$server->getEncryptionManager()->isEnabled());
$backends = \OC::$server->getUserManager()->getBackends();
$externalBackends = (count($backends) > 1) ? true : false;