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;