diff --git a/resources/inc/class.resources_ui.inc.php b/resources/inc/class.resources_ui.inc.php index 94218251e2..f216c04c3e 100755 --- a/resources/inc/class.resources_ui.inc.php +++ b/resources/inc/class.resources_ui.inc.php @@ -526,10 +526,13 @@ class resources_ui if ($_GET['msg']) $content['msg'] = strip_tags($_GET['msg']); // some presetes - $content['resource_picture'] = $this->bo->get_picture($content['res_id'],false); - // Set original size picture - $content['picture_original'] = $content['picture_src'] == 'own_src'? - 'webdav.php/apps/resources/'.$content['res_id'].'/.picture.jpg': $this->bo->get_picture($content['res_id'],true); + if($content['res_id']) + { + $content['resource_picture'] = $this->bo->get_picture($content['res_id'], false); + // Set original size picture + $content['picture_original'] = $content['picture_src'] == 'own_src' ? + 'webdav.php/apps/resources/' . $content['res_id'] . '/.picture.jpg' : $this->bo->get_picture($content['res_id'], true); + } if(!$content['res_id']) {