From 8f4611e21d334ea3135bbdbf9519236bb4b6b173 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 2 Oct 2015 21:56:20 +0200 Subject: [PATCH] Check if decoded JSON returned null The value might return null resulting in a PHP error. Fixes https://github.com/owncloud/core/issues/19542 --- settings/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings/admin.php b/settings/admin.php index ec49b3e823..aa891314fa 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;