8000 [TwigBundle] fixed Include file locations in "Template could not be f… by rvanginneken · Pull Request #16202 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[TwigBundle] fixed Include file locations in "Template could not be f… #16202

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

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
[CodingStandards] Conformed to coding standards
  • Loading branch information
rvanginneken committed Oct 11, 2015
commit 84ae93a8bbfc960a2add87084166b8fa00fe8d39
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected function findTemplate($template, $throw = true)
if (false === $file || null === $file) {
list($namespace, $name) = $this->parseName($logicalName);
Copy link
Member

Choose a reason for hiding this comment

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

We need to be careful here as parseName() can throw exceptions itself.

$paths = $this->getPaths($namespace);
array_walk($paths, function (&$path) use ($name) { $path .= '/' . $name; });
array_walk($paths, function (&$path) use ($name) { $path .= '/'.$name; });
throw new \Twig_Error_Loader(sprintf('Unable to find template "%s" (tried: %s).', $name, implode(', ', $paths)), -1, null, $previous);
}

Expand Down
0