diff --git a/resources/inc/class.resources_bo.inc.php b/resources/inc/class.resources_bo.inc.php index 51720bc0d3..bb9ea1eaf8 100755 --- a/resources/inc/class.resources_bo.inc.php +++ b/resources/inc/class.resources_bo.inc.php @@ -312,9 +312,11 @@ class resources_bo if($res_id < 1){return;} $data = $this->so->search('','res_id,name','','','','','',$start,array('accessory_of' => $res_id),'',$need_full_no_count=true); $acc_list = array(); - foreach($data as $num => $resource) - { - $acc_list[$resource['res_id']] = $resource['name']; + if($data) { + foreach($data as $num => $resource) + { + $acc_list[$resource['res_id']] = $resource['name']; + } } return $acc_list; }