From 666fe848d877a17ef40b652e869a4da2d625b017 Mon Sep 17 00:00:00 2001 From: MARQUES Karl Date: Thu, 2 Nov 2017 14:36:37 +0100 Subject: [PATCH] Fix VarDumper\Data in controller->getMessage --- src/Controller/ProfilerController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Controller/ProfilerController.php b/src/Controller/ProfilerController.php index 86df739..7a4d1dd 100644 --- a/src/Controller/ProfilerController.php +++ b/src/Controller/ProfilerController.php @@ -179,6 +179,11 @@ protected function getMessage(Request $request, $token) $profile = $profiler->loadProfile($token); $messages = $profile->getCollector('translation')->getMessages(); + + if ($messages instanceof Data) { + $messages = $messages->getValue(true); + } + if (!isset($messages[$messageId])) { throw $this->createNotFoundException(sprintf('No message with key "%s" was found.', $messageId)); }