From aad269c2f87ced4d9d68a1754784f81439c7dd09 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 31 Aug 2016 16:11:57 +0200 Subject: [PATCH] Fix PHP warning when handling shared namespace with empty prefix (#5420) --- CHANGELOG | 1 + program/steps/settings/folders.inc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 493f9ce1c..09e88e8db 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -49,6 +49,7 @@ CHANGELOG Roundcube Webmail - Fix so "All" messages selection is resetted on search reset (#5413) - Fix bug where folder creation could fail if personal namespace contained more than one entry (#5403) - Fix error causing empty INBOX listing in Firefox when using an URL with user:password specified (#5400) +- Fix PHP warning when handling shared namespace with empty prefix (#5420) RELEASE 1.2.1 ------------- diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc index fbe2701fd..345eb4785 100644 --- a/program/steps/settings/folders.inc +++ b/program/steps/settings/folders.inc @@ -330,7 +330,7 @@ function rcmail_subscription_form($attrib) if (!$disabled) { $tmp_ns = array_merge((array)$namespace['other'], (array)$namespace['shared']); foreach ($tmp_ns as $item) { - if (strpos($folder['id'], $item[0]) === 0) { + if (strlen($item[0]) && strpos($folder['id'], $item[0]) === 0) { $disabled = true; break; }