Skip to content

Commit 464036b

Browse files
committed
fix: ensure parameter for formatIdentifier function is string
1 parent 9e03327 commit 464036b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/router/src/Middleware/ThrottleRequests.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ protected function resolveMaxAttempts(int|string $maxAttempts): int
179179
protected function resolveRequestSignature(): string
180180
{
181181
if ($user = $this->user()) {
182-
return $this->formatIdentifier($user->getAuthIdentifier());
182+
return $this->formatIdentifier((string) $user->getAuthIdentifier());
183183
}
184184

185185
$domain = $this->domain();
@@ -210,8 +210,8 @@ protected function buildException(
210210
);
211211

212212
return is_callable($responseCallback)
213-
? new HttpResponseException($responseCallback($request, $headers))
214-
: new ThrottleRequestsException('Too Many Attempts.', headers: $headers);
213+
? new HttpResponseException($responseCallback($request, $headers))
214+
: new ThrottleRequestsException('Too Many Attempts.', headers: $headers);
215215
}
216216

217217
/**

0 commit comments

Comments
 (0)