Skip to content

Commit 9580861

Browse files
committed
fix: use explicit checks instead of empty on client object
1 parent 0874c11 commit 9580861

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Controller/AuthorizationController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function indexAction(Request $request): Response
126126
//
127127
// so if redirectUri is not already set, we try to set request redirect_uri params, fallback to first redirectUri of client
128128
/** @psalm-suppress RiskyTruthyFalsyComparison !empty($e->getHint()),empty($e->getRedirectUri()) we really want to check null and empty */
129-
if (!empty($client)
129+
if (isset($client) && $client !== null
130130
&& ('invalid_client' === $e->getErrorType()
131131
|| ('invalid_request' === $e->getErrorType() && !empty($e->getHint())
132132
&& !\in_array(sscanf($e->getHint() ?? '', 'Check the `%s` parameter')[0] ?? null, ['client_id', 'client_secret', 'redirect_uri'])))

0 commit comments

Comments
 (0)