We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d546a37 commit 1481461Copy full SHA for 1481461
system/Security/Security.php
@@ -324,7 +324,8 @@ private function removeTokenInRequest(RequestInterface $request): void
324
$request->setGlobal('post', $_POST);
325
} else {
326
$body = $request->getBody() ?? '';
327
- if (! empty($json = json_decode($body)) && json_last_error() === JSON_ERROR_NONE) {
+ $json = json_decode($body);
328
+ if (! empty($json) && json_last_error() === JSON_ERROR_NONE) {
329
// We kill this since we're done and we don't want to pollute the JSON data.
330
unset($json->{$this->config->tokenName});
331
$request->setBody(json_encode($json));
0 commit comments