1
1
Fork 0

Use an exception

This commit is contained in:
Michael 2021-01-21 21:53:19 +00:00
parent fbcc59cc1d
commit 0c14f41873

View 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);
}