Skip to content

Commit

Permalink
fix: Explicitly cast to boolean
Browse files Browse the repository at this point in the history
With strict type checking, passing a non-boolean as email scan result leads to a fatal error.
  • Loading branch information
eFrane authored Aug 23, 2021
1 parent f521e24 commit 15898d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Security/UserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private function hydrateUser(array $data): User
$data['email_confirm_token'],
json_decode($data['roles'], true),
array_map(fn (array $data) => new User\Organization($data['alias'], $data['name'], $data['role'], $data['has_anonymous_access']), $organizations),
$data['email_scan_result'],
(bool) $data['email_scan_result'],
$data['timezone'],
);
}
Expand Down

0 comments on commit 15898d4

Please sign in to comment.