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