File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments