Skip to content

Commit 3e97a3f

Browse files
committed
Guard against empty cache event keys
1 parent 7bec508 commit 3e97a3f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Sentry/Laravel/Features/CacheIntegration.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ public function handleCacheEventsForBreadcrumbs(Events\CacheEvent $event): void
8787
return;
8888
}
8989

90-
$displayKey = $this->replaceSessionKey($event->key);
90+
$displayKey = '';
91+
if ($event->key !== null) {
92+
$displayKey = $this->replaceSessionKey($event->key);
93+
}
9194

9295
Integration::addBreadcrumb(new Breadcrumb(
9396
Breadcrumb::LEVEL_INFO,

0 commit comments

Comments
 (0)