]> git.mxchange.org Git - friendica.git/commitdiff
Use an exception
authorMichael <heluecht@pirati.ca>
Thu, 21 Jan 2021 21:53:19 +0000 (21:53 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 21 Jan 2021 21:53:19 +0000 (21:53 +0000)
src/Module/Filer/SaveTag.php

index fc995ce2608e9afc76c3e23fd74be379d9c62135..03e30fa54ab7edec04b2a0bc134499d2997363eb 100644 (file)
@@ -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);
                }