Check if decoded JSON returned null

The value might return null resulting in a PHP error.

Fixes https://github.com/owncloud/core/issues/19542
This commit is contained in:
Lukas Reschke 2015-10-02 21:56:20 +02:00
Родитель 94013ffb82
Коммит 8f4611e21d
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;