Skip to content

Commit fa35799

Browse files
author
Ngo Quoc Dat
committed
wip
1 parent f427948 commit fa35799

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

system/Security/Security.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,7 @@ private function getPostedToken(RequestInterface $request): ?string
307307
// Does the token exist in POST, HEADER or optionally php:://input - json data or PUT, DELETE, PATCH - raw data.
308308

309309
if ($tokenValue = $request->getPost($this->config->tokenName)) {
310-
if (! is_string($tokenValue)) {
311-
return null;
312-
}
313-
314-
return $tokenValue;
310+
return is_string($tokenValue) ? $tokenValue : null;
315311
}
316312

317313
if ($request->hasHeader($this->config->headerName)

0 commit comments

Comments
 (0)