From abe6c19af6dabe5583cabe8dc0568c2d88daeea9 Mon Sep 17 00:00:00 2001 From: Andrew Znamen Date: Mon, 6 Apr 2020 14:53:29 +0300 Subject: [PATCH] Fix process error with no request --- src/ErrorsBundle/Manager/ErrorsManager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ErrorsBundle/Manager/ErrorsManager.php b/src/ErrorsBundle/Manager/ErrorsManager.php index 783dd34..dc328be 100644 --- a/src/ErrorsBundle/Manager/ErrorsManager.php +++ b/src/ErrorsBundle/Manager/ErrorsManager.php @@ -141,14 +141,15 @@ public function proceedErrors() $error->setUrl($request->getPathInfo()); $error->setReferrer($request->headers->get('referer', '')); $error->setGlobalVars($request->server->all()); + $error->setRequestContent($request->getContent()); } else { $error->setUrl(''); $error->setReferrer(''); $error->setGlobalVars([]); + $error->setRequestContent(''); } $error->setBaseHost($this->baseHost); $error->setHostName(gethostname()); - $error->setRequestContent($request->getContent()); $token = $this->tokenStorage->getToken(); if (null !== $token) {