8000 Pass missing request template variables by wouterj · Pull Request #16104 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Pass missing request template variables #16104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 5, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function panelAction(Request $request, $token)
}

if (!$profile = $this->profiler->loadProfile($token)) {
return new Response($this->twig->render('@WebProfiler/Profiler/info.html.twig', array('about' => 'no_token', 'token' => $token)), 200, array('Content-Type' => 'text/html'));
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'));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we change this to a redirect to _profiler_info, just like is done with the other info messages?

}

if (!$profile->hasCollector($panel)) {
Expand Down Expand Up @@ -140,13 +140,14 @@ public function purgeAction()
/**
* Displays information page.
*
* @param string $about The about message
* @param Request $request The current HTTP Request
* @param string $about The about message
*
* @return Response A Response instance
*
* @throws NotFoundHttpException
*/
public function infoAction($about)
public function infoAction(Request $request, $about)
{
if (null === $this->profiler) {
throw new NotFoundHttpException('The profiler must be enabled.');
Expand All @@ -156,6 +157,7 @@ public function infoAction($about)

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

Expand Down
0