diff --git a/resources/inc/class.ui_resources.inc.php b/resources/inc/class.ui_resources.inc.php index 7fa9979f50..897c290abf 100755 --- a/resources/inc/class.ui_resources.inc.php +++ b/resources/inc/class.ui_resources.inc.php @@ -478,9 +478,14 @@ class ui_resources // so it is possible to select all resources of a category foreach($cats as $cat_id => $cat_name) { - $resources = $this->bo->so->search(array('cat_id' => $cat_id),'res_id'); - foreach($resources as $res) $key .= ($key == "")?'r'.$res['res_id']:',r'.$res['res_id']; - $selectbox_content[$key] = $cat_name; + if (($resources = $this->bo->so->search(array('cat_id' => $cat_id),'res_id'))) + { + foreach($resources as $res) + { + $key .= ($key == "")?'r'.$res['res_id']:',r'.$res['res_id']; + } + $selectbox_content[$key] = $cat_name; + } } $selectbox = $this->html->select( 'owner',