Skip to content

Commit f5c2b2c

Browse files
committed
fix error for unpublished workshop item downloads
1 parent b885690 commit f5c2b2c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎controllers/Workshop/WorkshopDownloadController.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function download(
5050
// Users with a role of moderator or higher can always download workshop items
5151
if(
5252
$workshop_item->isPublished() !== true
53-
&& $account->getUser()->getRole()->value < UserRole::Moderator->value
53+
&& ($account->getUser() === null || $account->getUser()->getRole()->value < UserRole::Moderator->value)
5454
){
5555
throw new HttpNotFoundException($request);
5656
}

0 commit comments

Comments
 (0)