diff --git a/controllers/EditAlbum.php b/controllers/EditAlbum.php index 76d549d..c24787d 100644 --- a/controllers/EditAlbum.php +++ b/controllers/EditAlbum.php @@ -132,7 +132,8 @@ class EditAlbum extends HTMLController 'id_tag' => $id_tag, ], true); - $this->page->adopt(new FeaturedThumbnailManager($assets, $id_tag ? $album->id_asset_thumb : 0)); + if ($num_assets > 0) + $this->page->adopt(new FeaturedThumbnailManager($assets, $id_tag ? $album->id_asset_thumb : 0)); } if (isset($_POST['changeThumbnail'])) diff --git a/controllers/EditTag.php b/controllers/EditTag.php index fcb0e96..c96ef0e 100644 --- a/controllers/EditTag.php +++ b/controllers/EditTag.php @@ -123,7 +123,8 @@ class EditTag extends HTMLController 'id_tag' => $id_tag, ], true); - $this->page->adopt(new FeaturedThumbnailManager($assets, $id_tag ? $tag->id_asset_thumb : 0)); + if ($num_assets > 0) + $this->page->adopt(new FeaturedThumbnailManager($assets, $id_tag ? $tag->id_asset_thumb : 0)); } if (isset($_POST['changeThumbnail']))