From: Michael Date: Tue, 5 Nov 2019 22:13:33 +0000 (+0000) Subject: Exceptions X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7adc3460b367d3f8c0299416d4f91873bb9e449a;p=friendica.git Exceptions --- diff --git a/src/Module/Starred.php b/src/Module/Starred.php index dbda9f1076..74b75a42b0 100644 --- a/src/Module/Starred.php +++ b/src/Module/Starred.php @@ -13,18 +13,18 @@ class Starred extends BaseModule public static function rawContent(array $parameters = []) { if (!local_user()) { - exit(); + throw new \Friendica\Network\HTTPException\NotFoundException(); } if (empty($parameters['item'])) { - exit; - } else { - $itemId = intval($parameters['item']); + throw new \Friendica\Network\HTTPException\NotFoundException(); } + $itemId = intval($parameters['item']); + $item = Item::selectFirstForUser(local_user(), ['starred'], ['uid' => local_user(), 'id' => $itemId]); if (empty($item)) { - exit(); + throw new \Friendica\Network\HTTPException\NotFoundException(); } $starred = !(bool)$item['starred'];