Skip to content

Commit ca6c800

Browse files
committed
implement changes from code review
1 parent c48f34b commit ca6c800

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

system/Security/Security.php

Lines changed: 2 additions & 1 deletion
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)