Skip to content

Commit 1481461

Browse files
committed
implement missing changes from the code review
1 parent d546a37 commit 1481461

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

system/Security/Security.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ private function removeTokenInRequest(RequestInterface $request): void
324324
$request->setGlobal('post', $_POST);
325325
} else {
326326
$body = $request->getBody() ?? '';
327-
if (! empty($json = json_decode($body)) && json_last_error() === JSON_ERROR_NONE) {
327+
$json = json_decode($body);
328+
if (! empty($json) && json_last_error() === JSON_ERROR_NONE) {
328329
// We kill this since we're done and we don't want to pollute the JSON data.
329330
unset($json->{$this->config->tokenName});
330331
$request->setBody(json_encode($json));

0 commit comments

Comments
 (0)