mirror of
https://github.com/friendica/friendica
synced 2024-11-18 06:23:41 +00:00
Reduce error-throws :-)
This commit is contained in:
parent
a81708091f
commit
d524f55e3e
1 changed files with 1 additions and 5 deletions
|
@ -54,11 +54,7 @@ class Show extends BaseModule
|
|||
throw new HTTPException\UnauthorizedException($this->t('Permission denied.'));
|
||||
}
|
||||
|
||||
if (empty($this->parameters['id'])) {
|
||||
throw new HTTPException\BadRequestException($this->t('Invalid Request'));
|
||||
}
|
||||
|
||||
$event = Event::getByIdAndUid($this->session->getLocalUserId(), (int)$this->parameters['id'], $this->parameters['nickname'] ?? '');
|
||||
$event = Event::getByIdAndUid($this->session->getLocalUserId(), (int)$this->parameters['id'] ?? 0, $this->parameters['nickname'] ?? '');
|
||||
|
||||
if (empty($event)) {
|
||||
throw new HTTPException\NotFoundException($this->t('Event not found.'));
|
||||
|
|
Loading…
Reference in a new issue