diff --git a/src/Listeners/LogFailedWebhook.php b/src/Listeners/LogFailedWebhook.php index b165826..c8cb5a0 100644 --- a/src/Listeners/LogFailedWebhook.php +++ b/src/Listeners/LogFailedWebhook.php @@ -57,8 +57,8 @@ public function handle(WebhookCallFailedEvent $event) } // Check if it was a personal access token which made the request - if ($accessTokenId && PersonalAccessToken::where('id', $accessTokenId)->exists()) { - $data['access_token_id'] = $accessTokenId; + if ($accessTokenId && is_numeric($accessTokenId) && PersonalAccessToken::where('id', $accessTokenId)->exists()) { + $data['access_token_id'] = (int) $accessTokenId; } // Log webhook callback event diff --git a/src/Listeners/LogFinalWebhookAttempt.php b/src/Listeners/LogFinalWebhookAttempt.php index 3ac6965..643c7b1 100644 --- a/src/Listeners/LogFinalWebhookAttempt.php +++ b/src/Listeners/LogFinalWebhookAttempt.php @@ -59,8 +59,8 @@ public function handle(FinalWebhookCallFailedEvent $event) } // Check if it was a personal access token which made the request - if ($accessTokenId && PersonalAccessToken::where('id', $accessTokenId)->exists()) { - $data['access_token_id'] = $accessTokenId; + if ($accessTokenId && is_numeric($accessTokenId) && PersonalAccessToken::where('id', $accessTokenId)->exists()) { + $data['access_token_id'] = (int) $accessTokenId; } // log webhook event diff --git a/src/Listeners/LogSuccessfulWebhook.php b/src/Listeners/LogSuccessfulWebhook.php index 67406d7..fc57d66 100644 --- a/src/Listeners/LogSuccessfulWebhook.php +++ b/src/Listeners/LogSuccessfulWebhook.php @@ -57,8 +57,8 @@ public function handle(WebhookCallSucceededEvent $event) } // Check if it was a personal access token which made the request - if ($accessTokenId && PersonalAccessToken::where('id', $accessTokenId)->exists()) { - $data['access_token_id'] = $accessTokenId; + if ($accessTokenId && is_numeric($accessTokenId) && PersonalAccessToken::where('id', $accessTokenId)->exists()) { + $data['access_token_id'] = (int) $accessTokenId; } // Log webhook callback event