]> git.mxchange.org Git - friendica.git/commitdiff
Reduce error-throws :-)
authorPhilipp <admin@philipp.info>
Mon, 7 Nov 2022 19:34:05 +0000 (20:34 +0100)
committerPhilipp <admin@philipp.info>
Mon, 7 Nov 2022 19:34:05 +0000 (20:34 +0100)
src/Module/Calendar/Event/Show.php

index c70a680fdcf44442a5936cf25c2f3c54a937e88d..85d4d47a7a75a13bb48ac5f80a84e15bcc6717f0 100644 (file)
@@ -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.'));