From a6af9eca0898ee5973a34d68d7f26ac2a8d7d8d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=B6nner?= Date: Fri, 5 Aug 2022 12:47:51 +0200 Subject: [PATCH] Change parameter handling for logging via GET (#47) This fixes #44 Fixes Symfony 6 support --- Controller/LogController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Controller/LogController.php b/Controller/LogController.php index fdecbec..8d26283 100644 --- a/Controller/LogController.php +++ b/Controller/LogController.php @@ -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;