Reduce error-throws :-)

pull/12121/head
Philipp 2022-11-07 20:34:05 +01:00
rodzic a81708091f
commit d524f55e3e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 24A7501396EB5432
1 zmienionych plików z 1 dodań i 5 usunięć

Wyświetl plik

@ -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.'));