- Fix "PHP Warning: Invalid argument supplied for foreach()" (#1488264)

pull/1/head
alecpl 13 years ago
parent c69c0a9197
commit 34c2e34671

@ -293,6 +293,7 @@ function rcube_subscription_form($attrib)
if (!$disabled && $folder['virtual'] && $folder['level'] == 0 && !empty($namespace)) {
$fname = $folder['id'] . $delimiter;
foreach ($namespace as $ns) {
if (is_array($ns)) {
foreach ($ns as $item) {
if ($item[0] === $fname) {
$disabled = true;
@ -301,6 +302,7 @@ function rcube_subscription_form($attrib)
}
}
}
}
// check if the folder is an other users virtual-root folder, then disable subscription option on it
if (!$disabled && $folder['virtual'] && $folder['level'] == 1
&& !empty($namespace) && !empty($namespace['other'])

Loading…
Cancel
Save