Skip to content

Commit

Permalink
Fix: Index error notice (#486)
Browse files Browse the repository at this point in the history
Co-authored-by: Niclas Norin <niclas.norin@helsingborg.se>
  • Loading branch information
2 people authored and Sebastian Thulin committed Sep 29, 2023
1 parent 6d23984 commit 4818666
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/php/Module/Index/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function switchContent($preferdValue, $secondaryValue)
*/
public function getThumbnail($item)
{
if ($item['image_display'] == 'custom' || $item['link_type'] == 'external' || $item['link_type'] == 'unlinked') {
if ($item['image_display'] == 'custom' || $item['link_type'] == 'external' || $item['link_type'] == 'unlinked' && !empty($item['custom_image']['ID'])) {
return wp_get_attachment_image_src(
$item['custom_image']['ID'],
apply_filters(
Expand Down

0 comments on commit 4818666

Please sign in to comment.