From: Michael Date: Thu, 21 Jan 2021 21:53:19 +0000 (+0000) Subject: Use an exception X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0c14f418735a53a3c1c376fa2d75cf0df0f35cd1;p=friendica.git Use an exception --- diff --git a/src/Module/Filer/SaveTag.php b/src/Module/Filer/SaveTag.php index fc995ce260..03e30fa54a 100644 --- a/src/Module/Filer/SaveTag.php +++ b/src/Module/Filer/SaveTag.php @@ -26,6 +26,7 @@ use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model; +use Friendica\Network\HTTPException; use Friendica\Util\XML; /** @@ -55,7 +56,7 @@ class SaveTag extends BaseModule if ($item_id && strlen($term)) { $item = Model\Post::selectFirst(['uri-id'], ['id' => $item_id]); if (!DBA::isResult($item)) { - return; + throw new HTTPException\NotFoundException(); } Model\Post\Category::storeFileByURIId($item['uri-id'], local_user(), Model\Post\Category::FILE, $term); }