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

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

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Oct 4, 2015

Some render calls were missing the request variable, while it is used in the layout.html.twig template.

Q A
Fixed tickets -
License MIT

@@ -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?

@fabpot
Copy link
Member

fabpot commented Oct 5, 2015

Thank you @wouterj.

@fabpot fabpot merged commit 7f1b2c2 into symfony:2.8 Oct 5, 2015
fabpot added a commit that referenced this pull request Oct 5, 2015
This PR was merged into the 2.8 branch.

Discussion
----------

Pass missing request template variables

Some render calls were missing the `request` variable, while it is used in the `layout.html.twig` template.

| Q | A
| --- | ---
| Fixed tickets | -
| License | MIT

Commits
-------

7f1b2c2 Pass missing request template variables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants