Throw IAE again (should never become visible)

This commit is contained in:
Roland Häder 2022-06-23 10:03:10 +02:00
parent 35c78ce14c
commit d8ff966d21
Signed by: roland
GPG key ID: C82EDE5DDFA0BA77

View file

@ -125,8 +125,9 @@ class Post
/**
* Fetch the privacy of the post
*
* @param array $item
* @return string
* @param array $item Item record
* @return string Item privacy message
* @throws InvalidArgumentException If $item['private'] is unknown
*/
private function fetchPrivacy(array $item): string
{
@ -142,6 +143,9 @@ class Post
case Item::UNLISTED:
$output = DI::l10n()->t('Unlisted Message');
break;
default:
throw new InvalidArgumentException('Item privacy ' . $item['privacy'] . ' is unsupported');
}
return $output;