Skip to content

Commit 3d259bd

Browse files
committed
Fixed deprecation warnings about passing null as parameter
1 parent 2b2e821 commit 3d259bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Firewall/UsernamePasswordJsonAuthenticationListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ public function __construct(TokenStorageInterface $tokenStorage, AuthenticationM
8282

8383
public function supports(Request $request): ?bool
8484
{
85-
if (false === strpos($request->getRequestFormat(), 'json')
86-
&& false === strpos($request->getContentType(), 'json')
85+
if (false === strpos($request->getRequestFormat() ?? '', 'json')
86+
&& false === strpos($request->getContentType() ?? '', 'json')
8787
) {
8888
return false;
8989
}

0 commit comments

Comments
 (0)