From e9ca17cec14c5a702cc7d656e5206a3c086dd550 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 18 Oct 2022 12:39:13 +0200 Subject: fix php warnings --- Zotlabs/Storage/Browser.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Storage/Browser.php') diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index 923906371..590c1cd9c 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -351,6 +351,9 @@ class Browser extends DAV\Browser\Plugin { $header = (($cat) ? t('File category') . ": " . $this->escapeHTML($cat) : t('Files')); $channel = channelx_by_n($channel_id); + $lockstate = null; + $channel_acl = null; + if($channel) { $acl = new \Zotlabs\Access\AccessList($channel); $channel_acl = $acl->get(); @@ -391,10 +394,10 @@ class Browser extends DAV\Browser\Plugin { '$copy' => ['copy', t('Copy to target location'), 0, '', [t('No'), t('Yes')]], '$return_path' => $path, '$lockstate' => $lockstate, - '$allow_cid' => acl2json($channel_acl['allow_cid']), - '$allow_gid' => acl2json($channel_acl['allow_gid']), - '$deny_cid' => acl2json($channel_acl['deny_cid']), - '$deny_gid' => acl2json($channel_acl['deny_gid']), + '$allow_cid' => ((isset($channel_acl['allow_cid'])) ? acl2json($channel_acl['allow_cid']) : ''), + '$allow_gid' => ((isset($channel_acl['allow_gid'])) ? acl2json($channel_acl['allow_gid']) : ''), + '$deny_cid' => ((isset($channel_acl['deny_cid'])) ? acl2json($channel_acl['deny_cid']) : ''), + '$deny_gid' => ((isset($channel_acl['deny_gid'])) ? acl2json($channel_acl['deny_gid']) : ''), '$is_owner' => $is_owner, '$select_all_label' => t('Select All'), '$bulk_actions_label' => t('Bulk Actions'), -- cgit v1.2.3