Use an exception
This commit is contained in:
parent
fbcc59cc1d
commit
0c14f41873
|
@ -26,6 +26,7 @@ use Friendica\Core\Renderer;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Model;
|
use Friendica\Model;
|
||||||
|
use Friendica\Network\HTTPException;
|
||||||
use Friendica\Util\XML;
|
use Friendica\Util\XML;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -55,7 +56,7 @@ class SaveTag extends BaseModule
|
||||||
if ($item_id && strlen($term)) {
|
if ($item_id && strlen($term)) {
|
||||||
$item = Model\Post::selectFirst(['uri-id'], ['id' => $item_id]);
|
$item = Model\Post::selectFirst(['uri-id'], ['id' => $item_id]);
|
||||||
if (!DBA::isResult($item)) {
|
if (!DBA::isResult($item)) {
|
||||||
return;
|
throw new HTTPException\NotFoundException();
|
||||||
}
|
}
|
||||||
Model\Post\Category::storeFileByURIId($item['uri-id'], local_user(), Model\Post\Category::FILE, $term);
|
Model\Post\Category::storeFileByURIId($item['uri-id'], local_user(), Model\Post\Category::FILE, $term);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue