From 0c14f418735a53a3c1c376fa2d75cf0df0f35cd1 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 21 Jan 2021 21:53:19 +0000 Subject: [PATCH] Use an exception --- src/Module/Filer/SaveTag.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }