ViewPhotoAlbum: prevent undefined index due to missing thumb
This commit is contained in:
parent
1b7e745f11
commit
b8c53d7d4d
@ -137,7 +137,8 @@ class ViewPhotoAlbum extends HTMLController
|
|||||||
'id_tag' => $album['id_tag'],
|
'id_tag' => $album['id_tag'],
|
||||||
'caption' => $album['tag'],
|
'caption' => $album['tag'],
|
||||||
'link' => BASEURL . '/' . $album['slug'] . '/',
|
'link' => BASEURL . '/' . $album['slug'] . '/',
|
||||||
'thumbnail' => !empty($album['id_asset_thumb']) ? $assets[$album['id_asset_thumb']]->getImage() : null,
|
'thumbnail' => !empty($album['id_asset_thumb']) && isset($assets[$album['id_asset_thumb']])
|
||||||
|
? $assets[$album['id_asset_thumb']]->getImage() : null,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user