Fix php warning when kolab_skip_namespace=''

This commit is contained in:
Aleksander Machniak 2014-08-13 18:13:09 +02:00
parent a2d519a1ae
commit de14433797

View file

@ -115,12 +115,12 @@ class kolab_folders extends rcube_plugin
$this->add_label('foldertype' . $type); $this->add_label('foldertype' . $type);
} }
$skip_namespace = (array)$this->rc->config->get('kolab_skip_namespace'); $skip_namespace = $this->rc->config->get('kolab_skip_namespace');
$skip_roots = array(); $skip_roots = array();
if (!empty($skip_namespace)) { if (!empty($skip_namespace)) {
$storage = $this->rc->get_storage(); $storage = $this->rc->get_storage();
foreach ($skip_namespace as $ns) { foreach ((array)$skip_namespace as $ns) {
foreach((array)$storage->get_namespace($ns) as $root) { foreach((array)$storage->get_namespace($ns) as $root) {
$skip_roots[] = rtrim($root[0], $root[1]); $skip_roots[] = rtrim($root[0], $root[1]);
} }