From 4f2fcfce96487735d1502ecbb559fe5dacc9956e Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 7 Aug 2023 16:16:24 +0200 Subject: [PATCH] Fix PHP8 warnings --- plugins/libkolab/lib/kolab_storage_config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/libkolab/lib/kolab_storage_config.php b/plugins/libkolab/lib/kolab_storage_config.php index dcc2d138..e5bdf451 100644 --- a/plugins/libkolab/lib/kolab_storage_config.php +++ b/plugins/libkolab/lib/kolab_storage_config.php @@ -313,7 +313,7 @@ class kolab_storage_config // Note: this assumes there's only one other users namespace root if ($ns = $storage->get_namespace('other')) { if ($prefix = $ns[0][0]) { - list($otheruser, $path) = explode('/', substr($folder, strlen($prefix)), 2); + list($otheruser, $path) = array_pad(explode('/', substr($folder, strlen($prefix)), 2), 2, ''); $folder = 'user/' . $otheruser . $domain . '/' . $path; } } @@ -330,7 +330,7 @@ class kolab_storage_config // UID is optional here because sometimes we want // to build just a member uri prefix - if ($params['uid']) { + if (!empty($params['uid'])) { $url .= '/' . $params['uid']; }