Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7f1b2c2

Browse files
committed
Pass missing request template variables
1 parent c9e938c commit 7f1b2c2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function panelAction(Request $request, $token)
9696
}
9797

9898
if (!$profile = $this->profiler->loadProfile($token)) {
99-
return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', array('about' => 'no_token', 'token' => $token)), 200, array('Content-Type' => 'text/html'));
99+
return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', array('about' => 'no_token', 'token' => $token, 'request' => $request)), 200, array('Content-Type' => 'text/html'));
100100
}
101101

102102
if (!$profile->hasCollector($panel)) {
@@ -140,13 +140,14 @@ public function purgeAction()
140140
/**
141141
* Displays information page.
142142
*
143-
* @param string $about The about message
143+
* @param Request $request The current HTTP Request
144+
* @param string $about The about message
144145
*
145146
* @return Response A Response instance
146147
*
147148
* @throws NotFoundHttpException
148149
*/
149-
public function infoAction($about)
150+
public function infoAction(Request $request, $about)
150151
{
151152
if (null === $this->profiler) {
152153
throw new NotFoundHttpException('The profiler must be enabled.');
@@ -156,6 +157,7 @@ public function infoAction($about)
156157

157158
return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', array(
158159
'about' => $about,
160+
'request' => $request,
159161
)), 200, array('Content-Type' => 'text/html'));
160162
}
161163

0 commit comments

Comments
 (0)