Bugfix: array_search() expects parameter 2 to be array, null given

This commit is contained in:
the-djmaze 2022-10-18 08:48:59 +02:00
parent 9d9ea1ec31
commit 4faa4db112

View file

@ -131,9 +131,11 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
public function FilterAppData($bAdmin, &$aResult) : void
{
if (!$bAdmin && \is_array($aResult)) {
$key = \array_search(\RainLoop\Enumerations\Capa::AUTOLOGOUT, $aResult['Capa']);
if (false !== $key) {
unset($aResult['Capa'][$key]);
if (isset($aResult['Capa']) && \is_array($aResult['Capa'])) {
$key = \array_search(\RainLoop\Enumerations\Capa::AUTOLOGOUT, $aResult['Capa']);
if (false !== $key) {
unset($aResult['Capa'][$key]);
}
}
$sUID = \OC::$server->getUserSession()->getUser()->getUID();
$sWebDAV = \OC::$server->getURLGenerator()->linkTo('', 'remote.php') . '/dav/';