Skip to content

Commit

Permalink
Fix huge issue with template existence check
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval committed Oct 23, 2017
1 parent 45217d4 commit 69f13f7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion EventListener/LayoutsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function setRequestLayout(GetResponseEvent $event)
} while (null === $finalLayout && count($layouts));
}

if (null === $finalLayout || !$this->twig->exists($finalLayout['resource'])) {
if (null === $finalLayout || !$this->twig->getLoader()->exists($finalLayout['resource'])) {
throw new \Twig_Error_Loader(sprintf(
'Unable to find template %s for layout %s. The "layout" parameter must be a valid twig view to be used as a layout.',
$finalLayout['resource'], $finalLayout['name']
Expand Down
1 change: 0 additions & 1 deletion Tests/Fixtures/App/config/config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ framework:
secret: secret
translator: { fallbacks:['fr'] }
router: { resource: "%kernel.root_dir%/config/routing.yaml" }
templating: { engines: ['twig'] }
session:
storage_id: session.storage.mock_file

Expand Down

0 comments on commit 69f13f7

Please sign in to comment.