Prevent from rare PHP warning (T4325)

This commit is contained in:
Aleksander Machniak 2018-08-22 12:14:48 +02:00
parent 29c9ae015e
commit 8a5c092874

View file

@ -212,7 +212,9 @@ class kolab_addressbook extends rcube_plugin
// render a hierarchical list of kolab contact folders
kolab_storage::folder_hierarchy($this->folders, $tree);
$out .= $this->folder_tree_html($tree, $sources, $jsdata);
if ($tree && !empty($tree->children)) {
$out .= $this->folder_tree_html($tree, $sources, $jsdata);
}
$this->rc->output->set_env('contactgroups', array_filter($jsdata, function($src){ return $src['type'] == 'group'; }));
$this->rc->output->set_env('address_sources', array_filter($jsdata, function($src){ return $src['type'] != 'group'; }));