Skip to content

Commit

Permalink
Fix bug in sending of server side events
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Aug 18, 2023
1 parent b935843 commit 0a5b94e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/EventSubscriber/HandleServerSideEventSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public function dispatch(ServerSideEvent $serverSideEvent): void
return;
}

foreach ($this->getProperties() as $property) {
$properties = [] === $serverSideEvent->properties ? $this->getProperties() : $serverSideEvent->properties;

foreach ($properties as $property) {
if (null === $property->apiSecret) {
$this->logger->error(sprintf(
'You tried to send an event server side, but the API secret is not set on the property with measurement id %s',
Expand Down

0 comments on commit 0a5b94e

Please sign in to comment.