Skip to content

Commit b3359be

Browse files
committed
Release v4.7.2
1 parent 90f9eed commit b3359be

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

system/CodeIgniter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class CodeIgniter
5555
/**
5656
* The current version of CodeIgniter Framework
5757
*/
58-
public const CI_VERSION = '4.7.1';
58+
public const CI_VERSION = '4.7.2';
5959

6060
/**
6161
* App startup time.

system/Security/Security.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,15 +298,18 @@ private function removeTokenInRequest(IncomingRequest $request): void
298298
$json = null;
299299
}
300300

301-
if (is_object($json) && property_exists($json, $tokenName)) {
302-
unset($json->{$tokenName});
303-
$request->setBody(json_encode($json));
301+
if (is_object($json)) {
302+
if (property_exists($json, $tokenName)) {
303+
unset($json->{$tokenName});
304+
$request->setBody(json_encode($json));
305+
}
304306

305307
return;
306308
}
307309

308310
// If the token is found in form-encoded data, we can safely remove it.
309311
parse_str($body, $result);
312+
310313
unset($result[$tokenName]);
311314
$request->setBody(http_build_query($result));
312315
}

0 commit comments

Comments
 (0)