Resources: Fix error adding new accessory

Cannot access offset of type string on string (0)
This commit is contained in:
nathan 2023-08-14 15:01:21 -06:00
parent 2c5170f15b
commit 2faa699325

View File

@ -526,10 +526,13 @@ class resources_ui
if ($_GET['msg']) $content['msg'] = strip_tags($_GET['msg']); if ($_GET['msg']) $content['msg'] = strip_tags($_GET['msg']);
// some presetes // some presetes
$content['resource_picture'] = $this->bo->get_picture($content['res_id'],false); if($content['res_id'])
// Set original size picture {
$content['picture_original'] = $content['picture_src'] == 'own_src'? $content['resource_picture'] = $this->bo->get_picture($content['res_id'], false);
'webdav.php/apps/resources/'.$content['res_id'].'/.picture.jpg': $this->bo->get_picture($content['res_id'],true); // 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']) if(!$content['res_id'])
{ {