Skip to content

Commit

Permalink
event: default values if registration data not obtained
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kurowski committed Apr 13, 2023
1 parent d47ec2c commit 0d7fd51
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Event/Response/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,12 @@ public static function fromResponseData(array $data): self
),
),
Registration::from(
$data['registration']['is_registration_required'],
$data['registration']['is_event_full'],
/**
* Currently, administration unit chairmen can access BIS backend and remove there registration object data
* by mistake which then lead $data['registration'] being null. To prevent it, we set default values.
*/
$data['registration']['is_registration_required'] ?? false,
$data['registration']['is_event_full'] ?? false,
),
$photos,
$data,
Expand Down

0 comments on commit 0d7fd51

Please sign in to comment.