Skip to content

Commit 0f14c60

Browse files
committed
implement changes from code review
1 parent a37d81e commit 0f14c60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

system/Security/Security.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ private function getPostedToken(RequestInterface $request): ?string
354354
$body = (string) $request->getBody();
355355

356356
if ($body !== '') {
357-
if (! empty($json = json_decode($body)) && json_last_error() === JSON_ERROR_NONE) {
357+
$json = json_decode($body);
358+
if (! empty($json) && json_last_error() === JSON_ERROR_NONE) {
358359
return $json->{$this->config->tokenName} ?? null;
359360
}
360361

0 commit comments

Comments
 (0)