Skip to content

Commit 290dc03

Browse files
authored
Fix type exception for related users (#30)
1 parent 2777120 commit 290dc03

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Events/Handlers/RelatedUsersStatisticsInterceptor.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,13 @@ public function handle(TaskContract $taskContract): bool
4747
$userId = $taskContract->getEventDTO()->getBaseEventDTO()->getUserId();
4848
$temporaryUserId = $taskContract->getEventDTO()->getBaseEventDTO()->getTemporaryUserId();
4949

50+
if (empty($userId) || empty($temporaryUserId)) {
51+
return true;
52+
}
53+
5054
$this->relatedUsersStore::load($this->relatedUsersCacheRepository->getAll());
5155

52-
$this->relatedUsersStore->get()->append($userId, $temporaryUserId);
56+
$this->relatedUsersStore->get()->append((string)$userId, (string)$temporaryUserId);
5357

5458
$this->relatedUsersCacheManager->store(
5559
$this->relatedUsersStore->get()->getAll()

0 commit comments

Comments
 (0)