Skip to content

Commit c75ac24

Browse files
authored
Fix the command being null in the CommandStarting event (#194)
Fixes #193
1 parent 1601d89 commit c75ac24

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Sentry/Laravel/EventHandler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ protected function queueJobProcessedHandler(JobProcessed $event)
294294
protected function commandStartingHandler(CommandStarting $event)
295295
{
296296
Integration::configureScope(function (Scope $scope) use ($event): void {
297-
$scope->setTag('command', $event->command);
297+
if ($event->command) {
298+
$scope->setTag('command', $event->command);
299+
}
298300
});
299301
}
300302

0 commit comments

Comments
 (0)