Skip to content

Commit

Permalink
Change parameter handling for logging via GET (#47)
Browse files Browse the repository at this point in the history
This fixes #44

Fixes Symfony 6 support
  • Loading branch information
boenner authored Aug 5, 2022
1 parent 77cbd17 commit a6af9ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Controller/LogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public function __construct(Logger $logger)
public function createAction(Request $request)
{
if(Request::METHOD_GET === $request->getMethod()){
$level = (string) $request->query->get('level');
$message = (string) $request->query->get('msg');
$context = (array) $request->query->get('context', array());

$parameters = $request->query->all();
$level = $parameters['level'] ?? '';
$message = $parameters['msg'] ?? '';
$context = $parameters['context'] ?? [];
} else {
$postData = json_decode($request->getContent());
$level = (string) $postData->level;
Expand Down

0 comments on commit a6af9ec

Please sign in to comment.