File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -89,12 +89,12 @@ public function logRequest(RequestInterface $request): void
89
89
*/
90
90
protected function requestBodyCleanup (RequestInterface $ request ): string
91
91
{
92
- $ body = $ request ->getBody ();
92
+ $ body = $ request ->getBody ()-> getContents () ;
93
93
if (empty ($ body )) {
94
94
return '(empty) ' ;
95
95
}
96
96
97
- $ data = json_decode (( string ) $ body , true );
97
+ $ data = ( array ) json_decode ( $ body , true );
98
98
foreach (['password ' , 'old_password ' , 'confirm-password ' ] as $ field ) {
99
99
$ this ->maskPasswordField ($ data , $ field );
100
100
}
@@ -168,12 +168,12 @@ public function logResponse(ResponseInterface $response): void
168
168
*/
169
169
protected function responseBodyCleanup (ResponseInterface $ response ): string
170
170
{
171
- $ body = $ response ->getBody ();
171
+ $ body = $ response ->getBody ()-> getContents () ;
172
172
if (empty ($ body )) {
173
173
return '(empty) ' ;
174
174
}
175
175
176
- $ data = json_decode (( string ) $ body , true );
176
+ $ data = ( array ) json_decode ( $ body , true );
177
177
foreach (['jwt ' , 'renew ' ] as $ tok ) {
178
178
if (!empty ($ data ['meta ' ][$ tok ])) {
179
179
$ data ['meta ' ][$ tok ] = '*************** ' ;
You can’t perform that action at this time.
0 commit comments